Hi,
Where are the dollar signs before seatnum, seat1 etc
in the if condition.
..Deeps..
--- Anasta <[EMAIL PROTECTED]> wrote:
> What am i doing wrong here, the output is always
> 'empty'
>
>
>
>
> $result = mysql_query("SELECT username FROM users
> WHERE seatnum='seat1'") or die(mysql_erro
Anasta wrote:
> 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) {
> echo username;
> } else {
> echo 'empty';
> }
> ?>
That doesn't even look like PHP cod
What am i doing wrong here, the output is always 'empty'
if (seatnum == seat1) {
echo username;
} else {
echo 'empty';
}
?>
Just guessing since I'm not sure what you're trying to do, but...
$result = mysql_query("SELECT username FROM users WHERE seatnum='seat1'")
or die(mysql_error());
Anasta wrote:
What am i doing wrong here, the output is always 'empty'
if (seatnum == seat1) {
echo username;
} else {
echo 'empty';
}
?>
mysql_query() returns a resource, not the results themselves.
read: http://us3.php.net/manual/en/function.mysql-query.php especially
the 2nd example to see
On 5/5/05, Anasta <[EMAIL PROTECTED]> wrote:
> 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) {
you must use
if (seatnum == "seat1") {
> echo userna
5 matches
Mail list logo