Page 1 of 1

href HTML

Posted: Fri May 23, 2008 3:59 am
by nitsmooth
I m trying to create a hyperlink on Edit but my page is not running ...
plz tell me if thr smthing wrong with the href tag or the code is itself is wrong ....
i m actually displaying the results of the mysql database on the HTML page as u can see and then creating a hyperlink Edit as i told u...

<?php
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['username'] . "</td>";
echo "<td>" . $row['Address'] . "</td>";
echo "<td>" <a href = "edit_student.php">Edit</a> "</td>";
echo "<td>" . Delete . "</td";
echo "</tr>";
}
mysql_close($con);
?>

Re: href HTML

Posted: Fri May 23, 2008 5:22 am
by Scrumpy.Gums
Shouldn't this go in the code section of the forums? Anyway, the following line is wrong syntactically

Code: Select all

echo "<td>" <a href = "edit_student.php">Edit</a> "</td>";
It should be:

Code: Select all

echo '<td><a href="edit_student.php">Edit</a></td>';

Re: href HTML

Posted: Fri May 23, 2008 1:15 pm
by hawleyjr
Moved to PHP Code