RE: [PHP] Random Password Making.

2003-03-28 Thread Mark Cubitt
try this function randpassword () { $length = 6; srand((double)microtime()*100); $string = ''; while(strlen($string) != $length) { $type = rand(1,2); if ($letterammount = 4) {$type = 1;} if ($numammount = 2)

Re: [PHP] Random Password Making.

2003-03-28 Thread Steve Keller
At 3/28/2003 11:32 PM, Philip J. Newman wrote: Whats the best way to make a random password with 4 letters and 2 numbers? I don't know what the best way is, but I had fun doing this one. I filled the first 4 elements of an array with random letters by using the minimum ASCII value of a letter