Jump to content

R007S

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Posts posted by R007S

  1. Hey,

     

    I just created a register&login system (with a lill help of a tutorial made in 2004), but i'm having some issues when trying to Login.

     

    The register script works perfectly, it creates successfully a new account into the database, but when I try to Login it says that the password is wrong, instead of saying that the password is correct.

     

    I tried to figure out what the problem is.. but i can't get track of this.

     

    I think the problem is here:

     

           # Retrieve password from result, strip slashes
      		$dbarray = mysql_fetch_array($result);
      		$dbarray['password'] = stripslashes($dbarray['password']);
      		$password = stripslashes($password);
      		
      		# Validate that password is correct
      		if ($password == $dbarray['password'])
      		{
      				return 0; // Sucess! usrname and pw confirmed
      		}
      		else
      		{
      				return 2; // Indicates password failure
      		}

     

    Well, i attached the entire script so you could figure out.

    Thanks!

     

    [attachment deleted by admin]

×
×
  • 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.