You are aware that md5() generates a 32 byte character string?

Working on the 10 digit password request, have you alotted enough space in
your database columns to cater to a 32 byte string (64 for multibyte)?

BTW: md5 has eaten everything I've thrown at it ;-)

""bryan"" <[EMAIL PROTECTED]> wrote in message
005801c0a0f1$c5c3cd40$272478cc@bryan">news:005801c0a0f1$c5c3cd40$272478cc@bryan...
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
[EMAIL PROTECTED]
http://www.concept-factory.com






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to