Re: if then else statement not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Where are the dollar signs before seatnum, seat1 etc
in the if condition.

..Deeps..

--- Anasta <neretlis@xxxxxxxxxxxxxx> 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) {
> echo username;
> } else {
> echo 'empty';
> }
> ?>
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux