$query = "SELECT * FROM ClientInfo WHERE Email = '$Email' AND Pass = '$Password'";
$resultid = mysql_query($query);
$RowsReturned = mysql_num_rows($resultid);
if($RowsReturned == 0)
{
print "There appeared to be no users with that email/password. Check your spelling and try again.";
}
else
{
//Continue the script....
In the example above, I've already selected mydatabase and and connected to it. Essentially this code just matches the Email and Password values of the database and matches it to the Email and Pass values it recieved from the previous page.
This code works just fine and dandy on my WinXP box but when it's transferred to the Red Hat 7.2 server my host uses, it won't query correctly. I've tested the query in the PHPMyAdmin tool using the PHP generated statements (I used print to grab them out) and the SQL syntax is ok. However it tells me that
Warning: Supplied argument is not a valid MySQL result resource in (the path of my account)
My guess is that this is some windows to linux issue in MySQL or PHP, but I don't know how to work around it. Is this a case sensitivity issue or some such? Just guessing.
Thanks,
-Artie