md5

From: Date: Tue, 27 Feb 2001 19:16:22 +0000
Subject: md5
Groups: php.db 
Request: Send a blank email to php-db+get-6987@lists.php.net to get a copy of this message
I need some advice on this.... I am creating a random password through a function. This creates a random password and updates it in the database. The sql query works if I make it : $sql = "UPDATE members SET password='$password', verify='$verify' WHERE username='$username' "; but if I make the code (as below) with the md5, it does not. I must be doing something wrong, or it does not like to md5 random things or something. Any Advice? for ( $a=0; $a<1; $a++) { $password = newpwd( 10 ); $verify = $password; $dbcnx = mysql_connect('localhost', 'bryan', 'fitch'); mysql_select_db( "playtime" ); $sql = "UPDATE members SET password=' ".md5($password)." ', verify=' ".md5($verify)" ' WHERE username='$username' "; Thanks bryan Bryan Fitch Programmer Concept Factory bryan@concept-factory.com http://www.concept-factory.com

« previous php.db (#6987) next »