Jump to content

MORE HELP - URGENT


mnielsen

Recommended Posts

Hi, I have written my login script but it wont get passed the second 'if' statement. I've tried a few ways to get it working but same result. I end back up at my index page with nothing. The file is attached.

 

Please discard my last topic as it is now solved.

 

Here;s the if statement.

else if(confirmEmailPassword($email, $password) == 1 || confirmEmailPassword($email, $password) == 2){
header("Location: /index.php?LoginError=Invalid");
}

And here's the function.

function confirmEmailPassword($email, $password){
$sql = "SELECT `password` FROM `Accounts` WHERE `email` = '$email'";
$result = mysql_query($sql);
if(!$result || (mysql_num_rows($result) < 1)){
	return 1;
}
$dbarray = mysql_fetch_array($result);
$dbarray['password'] = stripslashes($dbarray['password']);
$password = stripslashes($password);
if($password == $dbarray['password']){
	return 0;
}else{
	return 2;
}
}

 

The source code is attached.

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/110879-more-help-urgent/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.