Copy link to clipboard
Copied
Dear,
I created a user registration for and encrypted the password using sha1
if ($pwdOK) {
$_POST['pwd'] = sha1($_POST['pwd']);
}
and for the login I used, this line of code right after the connection line to recognize the encrypted pwd as Dreamweaver doesn't do it on its own
if (isset($_POST['pwd'])) { $_POST['pwd'] = sha1($_POST['pwd']);}
but surprisingly, it is not working, I am being redirect to the error page instead, even though I am using both right user and password.
Any one, has any idea how I can possibly solve this problem.
Romeo
Copy link to clipboard
Copied
How big is the pwd column in your database? Anything encrypted with sha1 needs to be VARCHAR(40). If it's less than 40, it won't match.
Copy link to clipboard
Copied
thank you Mr. Power, that was the only problem, it works perfectly now, so thank you a lot. And for the record, your book has been a veritable bible for my learning, I am happy I put my hands on it.
Romeo
Date: Mon, 21 Sep 2009 16:53:27 -0600
From: forums@adobe.com
To: romeofilms@hotmail.com
Subject: Password, Dreamweaver, PHP and mysql
How big is the pwd column in your database? Anything encrypted with sha1 needs to be VARCHAR(40). If it's less than 40, it won't match.
>
Copy link to clipboard
Copied
Marking as assumed answered