Page 1 of 1

Account Verification

Posted: Thu Sep 27, 2007 9:30 pm
by Zeyber
How would you make a random number generator for something like a verification code? Is there an easy way to randomly generate numbers or letters?

Posted: Thu Sep 27, 2007 9:53 pm
by Christopher
As is often the case, the online manual may help.

http://www.php.net/manual/en/function.rand.php

There are some user examples that may be of interest.

Posted: Thu Sep 27, 2007 10:23 pm
by s.dot
rand(), mt_rand(), md5(), sha1(), hash(), uniqid(), substr() could all be useful for generating random strings.

Posted: Thu Sep 27, 2007 11:55 pm
by shylor
I use mt_rand() with at md5() on top. then stuff it into the database until the user clicks the link!

Posted: Fri Sep 28, 2007 12:00 am
by Zeyber
Cool thanks!