crypt
Posted: Sun Jun 20, 2004 2:33 am
Have been looking around on the internet and found some, however i just cant get this to work..
the password has been send to the db like this
this i am trying to use to login... and many other ways.. however no luck
the password has been send to the db like this
Code: Select all
$encrypted_password = crypt($_REQUEST['password']);Code: Select all
#with form <input type=text name=username> and <input type=password name=password>
$encrypted_password ='SELECT password FROM users WHERE login=?',array($_REQUEST['username']));
if (crypt($_REQUEST['password'],$encrypted_password)==$encrypted_password);
{
setcookie ("USERNAME", $_POST['username']);
setcookie ("PASSWORD", $_POST['password']);
echo 'logged in';
} else {
echo 'ERROR:';
}