href HTML

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nitsmooth
Forum Newbie
Posts: 13
Joined: Thu May 22, 2008 6:50 am

href HTML

Post 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);
?>
Scrumpy.Gums
Forum Commoner
Posts: 71
Joined: Thu Aug 30, 2007 2:57 pm
Location: Bristol, UK

Re: href HTML

Post 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>';
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Re: href HTML

Post by hawleyjr »

Moved to PHP Code
Post Reply