note 69808 deleted from function.crypt by joey

From: Date: Wed, 01 Aug 2012 01:27:23 +0000
Subject: note 69808 deleted from function.crypt by joey
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-189538@lists.php.net to get a copy of this message
Note Submitter: picolobo at pilab dot dyndns dot org ---- I had problems with ENCRYPT MySQL function when i tried to compare with the encrypted password (with ENCRYPT). Another solution i read from "UNIX Advanced programming" where i found about the UNIX system call "crypt()": Password="tB" //The two first letters of encrypted password SELECT password from users where Password=ENCRYPT('".$_POST['password']."',Password) mysql> select password from users where password=encrypt('pasword','tB'); +---------------+ | password | +---------------+ | tBY8OVuabSiTU | +---------------+ 1 row in set (0.01 sec) Bye. > topace at lightbox dot org > 22-Sep-2005 06:34 > > To authenticate against a stored crypt in MySQL, simply use: > > SELECT ................ > AND Password=ENCRYPT('".$_POST['password']."',Password)

« previous php.notes (#189538) next »