ok, this might be confusing, but I echoed $sql and I got another SQL statement: "select * from tblLogin"..etc...
This is the code I think it used:
$sql = "SELECT * FROM tblinfo WHERE inffanclubno= '$fanclubno'";
$result = mysql_query($sql);
if(mysql_num_rows($result) == 0){
$sql = "select * from tblLogin where lgnFanclubNo='$fanclubno'";
$newuser_result = mysql_query($sql);
$yourinfo_array = mysql_fetch_array($newuser_result);
$new_id = $yourinfo_array["lgnFanclubNo"];
$type = $yourinfo_array["lgnType"];
}
so basically my code is saying that there is nothing in the Info table so it went to the Login table.
so when it gets to:
<? if (mysql_num_rows($result) == 0){ ?> on line 132, there is nothing in $result because there was no result from the original query.
The only thing is that I know that there should be one row returned!! I ran the query through phpmyadmin and it returned one row! I should also add that I'm passing the variable $fanclubno through the URL.