if then else statement not working
| From: | Anasta | Date: | Thu, 05 May 2005 16:04:49 +0000 |
| Subject: | if then else statement not working | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-214547@lists.php.net to get a copy of this message | ||
What am i doing wrong here, the output is always 'empty'
<?php
$result = mysql_query("SELECT username FROM users
WHERE seatnum='seat1'") or die(mysql_error());
if (seatnum == seat1) {
echo username;
} else {
echo 'empty';
}
?>