if statement not working with database

BaBy RoDrI

New Member
Why isn't this code working?\[code\]$welcome = mysql_query("SELECT welcome FROM users WHERE id = '" . $_SESSION['user']['id'] . "'");if($welcome == '0'){echo 'register is 0';}else{echo 'register is 1';}\[/code\]\[code\]$_SESSION['user']['id']\[/code\] returns as 1, by the way.
 
Back
Top