View Full Version : doc link problem

09-09-2009, 12:29 PM
I have uplodaded doc file in mysql db(Estimation of serum ferritin.doc )
When i Use

<a href=uploads/<?php echo $pub_loc;?>>Read more...</a>

it give me the First Name only(Estimation)
What is the error please help me

include 'main.php'; // connection to DB
$link = bio_connect();//connection to DB
$res = mysql_query("select * from publications")or die(mysql_error());
while ($row=mysql_fetch_array($res))
$pub_id = $row[pub_id];
$pub_title = $row[pub_title];
$pub_obj = $row[pub_obj];
$pub_loc = $row[pub_loc];
$pub_date = $row[pub_date];

<?php echo $pub_date;?>
<tr align=left valign=top><p><font color=#0000FF><strong><?php echo $pub_title;?></strong></font></p>
<?php echo $pub_obj;?>
<a href=uploads/<?php echo $pub_loc;?>>Read more...</a>

09-09-2009, 12:47 PM
All attribute values should be enclosed by quotes, like

<a href="uploads/<?php echo $pub_loc;?>">Read more...</a>

PS: Validate (http://validator.w3.org/#validate_by_input) and fix the errors in your markup!

09-09-2009, 01:14 PM
Thank you very much for help me