Sorry, i missed the ; of this line:
$res = mysql_query($query) or die(mysql_error()) <-- needs a ;
Where you have:
PHP Code:
$stat = mysql_fetch_array(mysql_query("select * from players where user='$user' and pass='$pass'"));
if (empty ($stat['id'])) {
print "Invalid login.";
exit;
}
replace it with:
PHP Code:
$query = "select * from players where user='$user' and pass='$pass'";
echo 'DEBUG: $query<br />';
$res = mysql_query($query) or die(mysql_error());
$stat = mysql_fetch_array($res);
if (empty($stat['id'])) {
die('Invalid Login.');
}
It's the same as your code just with some debugging in it.
Bookmarks