[PHP] Re: if then else statement not working

2005-05-05 Thread Matthew Weier O'Phinney
* Anasta <[EMAIL PROTECTED]>: > What am i doing wrong here, the output is always 'empty' > > $result = mysql_query("SELECT username FROM users > WHERE seatnum='seat1'") or die(mysql_error()); > > if (seatnum == seat1) { What are you comparing? is seatnum a constant? is seat1 a constant? or is

[PHP] Re: if then else statement not working

2005-05-05 Thread Jason Barnett
Anasta wrote: What am i doing wrong here, the output is always 'empty' 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:

[PHP] Re: if then else

2005-05-04 Thread Jason Barnett
Anasta wrote: Can anyone help with a statement, ive tried but it never works. I need to show a value if it is set to a specific value ie: At the moment If a user is logs in a record is updated from 'away' to 'online'---so i want an echo statement to show a value from another table if they are set

[PHP] Re: if then else

2005-05-04 Thread David Robley
Anasta wrote: > Can anyone help with a statement, ive tried but it never works. > I need to show a value if it is set to a specific value ie: > > At the moment If a user is logs in a record is updated from 'away' to > 'online'---so i want an echo statement to show a value from another table > if