Forum Home
Press F1
 
Thread ID: 60183 2005-07-25 07:23:00 php encrypting password help needed Morgenmuffel (187) Press F1
Post ID Timestamp Content User
375260 2005-07-25 07:23:00 php encrypting password help needed

before I began encrypting the passwords it worked fine (and yes i have actually put encrypted passwords into the dBase)


I have this in my create user file to put the password into the database when creating a user

$password = crypt($password);

when the user logs in
this function checks their password

if (crypt($pass, trim($row["pass"])) == trim($row["pass"])){
do stuff

but I keep getting "invalid password" errors

$pass is the inout password
$row["pass"] is the valu pulled from the dBase


any help would be appreciated, as i haven't done encryption before, so any other suggestion would be fine

cheers and thanks for all the help on the previous thread
Morgenmuffel (187)
375261 2005-07-25 09:41:00 no worries it's solved

I was accidently reusing a variable name from an include file,
so my variable got overwritten everytime

rather depressingly it took 5 hrs to figure out

any thanks
Morgenmuffel (187)
1