パスワード md5 を暗号化して signup.php を設定しました。常に間違ったパスワードが構文である可能性がありますが、それを理解できませんでした...
signup.php
if (isset($_POST['user']))
{
$user = sanitizeString($_POST['user']);
$pass = sanitizeString($_POST['pass']);
if ($user == "" || $pass == "")
$error = "Not all fields were entered<br /><br />";
else
{
if (mysql_num_rows(queryMysql("SELECT * FROM members
WHERE user='$user'")))
$error = "That username already exists<br /><br />";
else
{
queryMysql("INSERT INTO members VALUES('$user', '".md5('$pass')."')");
die("<h4>Account created</h4>Please Log in.<br /><br />");
}
}
}
login.php
if(isset($_POST['user'])) {
$user = sanitizeString($_POST['user']);
$pass = sanitizeString($_POST['pass']);
if ($user == "" || $pass == "") {
$error = "Not all fields were entered<br />";
} else {
$query = "SELECT user,pass FROM members WHERE user = '$user' AND pass = \'\".md5('$pass').\"\'";
if(mysql_num_rows(queryMysql($query)) == 0) {
$error = "<span class='error'>Username/Password invalid</span><br /><br />";
} else {
$_SESSION['user'] = $user;
$_SESSION['pass'] = $pass;
die("You are now logged in. Please <a href='society.php?view=$user'>" .
"click here</a> to continue.<br /><br />");
}
}
}