Reply to Re: if then else statement not working

Your name:

Reply:


Posted by Jason Barnett on 05/05/05 20:18

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

[Back to original 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

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