I pass the variable "home" to a page with the code below. I used &home=yes.
What is wrong with the following syntax?
if ($home==yes) { echo "Home"; } else { while ($row = mysql_fetch_assoc($result)) { echo $row['Data']; echo "<br>"; } }
Try putting quotes around "yes" if ( $home == "yes" )
Found out it was the MySQL query and not that code. Thanks.