vendredi 10 avril 2015

Simple If Else Statement.

Trying to get this to work.. I don't understand the If else Statement. Basically if the Field Photo has a value I would like it to display if it has a value of Null Obviously the Else Statement woudl display.



$row = photo

$id = $_GET['id'];
$sql = "SELECT * FROM menu_category WHERE id = '$id' order by sort";
$query = mysql_query($sql);
while($row = mysql_fetch_array($query)) {

echo " <h1>".$row['category_field']."</h1> ";
echo "<div class=\"itemdescription\"> ".$row['description']."</div> ";

$row = photo("*");

if ($photo = "*") {
echo "Have a good day!";
} else {
echo "Have a good night!";
}

Aucun commentaire:

Enregistrer un commentaire