Its supposed to bring me to a new page, but alas, this isn’t so. Please, any recommendations?
[code]$usertrying = $_POST[username];
$ptrying = $_POST[password];
$secured_password = sha1($ptrying);
$user_correct = false;
$pw_correct = false;
$query = “SELECT * FROM USERS WHERE USERNAME=’$usertrying’ AND PASSWORD =’$secured_password’”;
$result = mysql_query($query)
if (mysql_num_rows($result) > 0) {
$user_correct = true;
$pw_correct = true;
}
if(($user_correct) && ($pw_correct))
{
$username = $usertrying;
session_register(‘username’);
header(‘Location:http://*******.com/privatedata.php’);
}
else
{
header(‘Location:http://******.com/login.php’);
}
[/code]
Btw, the DB connection is all good. Thanks.