Hey all im currently trying to test a login verification php script for an app that I am making. my issue is that when i run mysql_query it returns false(I assume) and I can't seem to figure out why. I ran the same sql statement on my phpMyAdmin account and works just fine. Here is my code:
<php
ini_set('display_errors', 1);
error_reporting(E_ALL);
$link = mysql_connect("address", "username", "password") or die("Could not connect");
mysql_select_db(""logininfo,$link) or die("Could not select database");
$sql = "SELECT * FROM 'Users' WHERE 'Email' = '$_POST[Email]' AND 'Password'='$_POST[Password]'";
$result = mysql_query($sql,$link);
if ($result == False){
echo" error here";
}
echo $result;
$numrows = mysql_result($result,0,0);
if ($numrows == 0) {
echo 'Login failed';
}
echo "login success";
?>
also note that when I run mysql_result() it returns an error message stating that: " mysql() expects paramater 1 to be resource, boolean given." so i am 85% sure that the error lies in $result but I do not know how to fix it. thank you