or any other problems for that matter (reguarding the method i use to store/verify the hash/password)?
$luser = username passed to the php page
$lpword = password passed to the php page
$query ="SELECT name, password, type FROM user_accounts WHERE name='$luser'";
$result = mysql_query($query, $link);
if (!$result) {
die('Invalid query: ' . mysql_error());
}
$num_rows = mysql_num_rows($result);
if($num_rows > 0){
list($name, $password, $type) = mysql_fetch_row($result);
$salt = substr($password, 0, 11);
$thehash = substr($password, 11, (strlen($password)));
$testp = $salt;
$testp .= $lpword;
$testhash = sha1($testp);
if($testhash == $thehash && $name == $luser && $type != "G") {
echo("Correct Password & Username, Logging you in now");
echo "<script>document.location='verify.php?cookie=set&nme={$name}&pwrd={$thehash}'</script>";
}else{
echo("Wrong Password or Username, or account has not yet been verified (check email).");
}
}else{
echo("Wrong Password or Username, or account has not yet been verified.");
}

Sign In
Register
Help
MultiQuote