It has been a while since I have coded php and I have recently decided to get back to it. This script used to work but as I said it has been a while and with all the updates in PHP it is out of date. Could someone give me some pointers on why this is no longer working.
These are the 2 bits of code involved. The first is on my homepage
<form method=post action=login.php>
<tr><td width="67" with=10>User:</td><td width="145"><input type=text name=user></td>
<td width="486" align=right with=100%>Current Game Time: <? $date = date("h:i:s A T"); print "$date"?> </td>
</tr>
<tr><td with=10>Password:</td><td><input type=password name=pass></td>
and then this is what it directs too
<?php
if (!$user || !$pass) {
include("head.php");
print "Please fill out all fields.";
include("foot.php");
exit;
}
include("head.php");
$pass = md5("$pass");
$logres = mysql_num_rows(mysql_query("select * from players where user='$user' 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("user");
session_register("pass");
print " <br>Welcome back. Please click <a href=updates.php>here</a> to continue..";
}
include("foot.php");
?>
NO matter what I do it just says please fill out al the fields. ONce again thank you in advance