Guys can anybody help me, I'm trying to fetch records from my database and use those records as links, my codes work but the first two records are not converted into a hyperlink, why it happened? what is wrong in my codes?
<?php
$username = $_SESSION['username'];
$query = "SELECT * FROM tbldoctor_info";
$result = mysql_query($query) or die(mysql_error());
$record = mysql_num_rows($result);
// check if their are records found
?>
<table cellspacing="2px" cellpadding="2px" align="center">
<tr><td><h3>Name</h3></td><td><h3>Specialty</h3></td></tr>
<?php
if ($record!=0)
{
while ($row = mysql_fetch_row($result))
{
//print_r($result);
$dname= $row[2].$space.$row[3].$space.$row[1];
$dspecialty= $row[7];
?>
<tr>
<td width="250px"><?php echo '<a href="ProfileDoctor.php" style="color:#33FF00;">$dname</a>'; ?></td>
<td width="250px"><?php echo $dspecialty; ?></td>
</tr>
<?php
}
}
else
{
die("No records to display");
}
mysql_close();
?>
</table>