You are here: Re: [PHP] if then else statement not working « PHP « IT news, forums, messages
Re: [PHP] if then else statement not working

Posted by Bala Chandar on 05/05/05 20:31

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация