Your query is badly formed. Try
$query = mysql_query("SELECT * FROM users WHERE email="" . $username . "" AND password='" . $password . "');"
Also, note that the mysql_ functions are deprecated. Update your code to mysqli or PDO.
1
solved Log in Script not returning the values from MYSQL [closed]