I would like to know how to use Mcrypt functions to encrypt passwords to be stored in a MySQL database, and, upon retrieval, compare them with user input.
I have followed the ONLamp tutorial at http://www.onlamp.com/pub/a/php/2001/07/26/encrypt.html?page=3 and the Webmonkey tutorial at http://hotwired.lycos.com/webmonkey/00/20/index4a_page3.html?tw=programming but was unsuccessful. I have also read most of the PHP Manual's reference on Mcrypt functions at http://www.php.net/manual/en/ref.mcrypt.php and some of the user contributed notes, but haven't been able to create a script that works.
Would anyone post some sample code that would do the above, or point me to a Web site that would show me how, please?
Thank you.
Eric