I trying test my website but keeps showing error Notice: Undefined variable: email in C:\Program Files\Abyss Web Server\htdocs\BallisticWar\login.php on line 2
Notice: Undefined variable: pass in C:\Program Files\Abyss Web Server\htdocs\BallisticWar\login.php on line 2
Notice: Undefined variable: email in C:\Program Files\Abyss Web Server\htdocs\BallisticWar\login.php on line 7
Notice: Undefined variable: pass in C:\Program Files\Abyss Web Server\htdocs\BallisticWar\login.php on line 7
This is the code if you need it
<?php include("head.php"); ?><?php
if ($email || $pass) {
print "Please fill out all fields.";
include("foot.php");
exit;
}
$logres = mysql_num_rows(mysql_query("SELECT * FROM players where email='$email' and pass='$pass'"));
if ($logres <= 0) {
print "Login failed. If you have not already, please signup. Otherwise, check your spelling and login again.";
include("foot.php");
exit;
} else {
session_register("email");
session_register("pass");
print "Welcome back. Please click <a href=updates.php>here</a> to continue..";
}
?><?php include("foot.php"); ?>