Please Debug My Code!

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
Thomas-T
Forum Newbie
Posts: 7
Joined: Thu Jul 24, 2008 11:32 am

Please Debug My Code!

Post by Thomas-T »

What the hell is wrong with this code??? It's not displaying ANYTHING in the browser! I've connected to the db, but I've obviously messed something up. PLEASE HELP!

mysql_select_db("db",$con);

$result = mysql_query("SELECT * FROM table");

while($row = mysql_fetch_array($result));
{
echo "<a href=\"review.php?id=" . $row['id'] . "\">";
echo $row['developer'] . "-" . $row['name'] . "</a>";
echo "<br /><hr />";
}

mysql_close($con);

include("footer.php");
?>
User avatar
ghurtado
Forum Contributor
Posts: 334
Joined: Wed Jul 23, 2008 12:19 pm

Re: Please Debug My Code!

Post by ghurtado »

Please use

Code: Select all

tags to format your code and make it easier to read.

What happens if you execute "SELECT * FROM table" directly on the database?
WebbieDave
Forum Contributor
Posts: 213
Joined: Sun Jul 15, 2007 7:07 am

Re: Please Debug My Code!

Post by WebbieDave »

View the suggestions in your other post first to see if they solve the problem.
Post Reply