0

Does anyone see an issue with the following IF statement... I sure can't yet it doesn't work!

VARIABLES:
$CHECK = A returned value from the database either "y" or "n", the value is returned successfully so I know that is not the issue here.

There is no error message returned, the IF statement simply refuses to work.

$check = mysql_fetch_row($resultX);
if($check == "y"){
}elseif($check == "n"){
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=main.php\">";
}
5
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by almostbob
0

I would simplify if there are only two choices:

$check = mysql_fetch_row($resultX);
          if($check == "y"){
          }else{
           echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=main.php\">";
          }
0

Does anyone see an issue with the following IF statement... I sure can't yet it doesn't work!

VARIABLES:
$CHECK = A returned value from the database either "y" or "n", the value is returned successfully so I know that is not the issue here.

There is no error message returned, the IF statement simply refuses to work.

$check = mysql_fetch_row($resultX);
if($check == "y"){
}elseif($check == "n"){
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=main.php\">";
}

First check what is inside your $resultX

var_dump(mysql_fetch_row($query));

or try posting your query also so that someone could help you
:)

0

offtopic to the op, but

$check = mysql_fetch_row($resultX);
if(!$check == "y"){header("Location: main.php");
exit;}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.