Re: if then else statement not working
| From: | Jason Barnett | Date: | Thu, 05 May 2005 17:18:53 +0000 |
| Subject: | Re: if then else statement not working | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-214561@lists.php.net to get a copy of this message | ||
Anasta wrote:
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) {I think maybe you mean this: if ($seatnum == 'seat1') { Heck from the code above you won't even have a $seatnum variable, you'll have a $result variable with some MySQL information in it. Read this: http://php.net/manual/en/function.mysql-result.php