Re: if then else statement not working

From: Date: Thu, 05 May 2005 17:31:19 +0000
Subject: Re: if then else statement not working
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-214556@lists.php.net to get a copy of this message
On 5/5/05, Anasta <neretlis@westnet.com.au> 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) { you must use if (seatnum == "seat1") { > echo username; > } else { > echo 'empty'; > } > ?> > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- bala> balachandar muruganantham blog> lynx http://chandar.blogspot.com web> http://www.chennaishopping.com

« previous php.general (#214556) next »