on 13/03/03 5:49 AM, Mike Walth ([EMAIL PROTECTED]) wrote: > Hello: > > What I am trying to do is to create a email verification routine with PHP. > When people register on the site they will get an email sent to them with a > link such as http://mysite.com/activation.php?ID=ghjghjg367ghjlkj9hjlkjhn0
what you want to do is use the random string as a verifying of an id... so their email address gets added to the db, with an id and a random value. your table may look like this: id email stamp confirm Then you send an email out with a link. For the fourth email address you add, it may look like this: http://site.com/confirm.php?id=4&c=182648 confirm.php grabs the id, checks the confirm code, and if all is well, resets the confirm code to 1 (true), or "yes", or whatever you choose. To get the random value, include this function that I just wrote for someone else in a different thread: <? function randNumber($min=1000,$max=99999) { // build a seed list($usec, $sec) = explode(' ', microtime()); $seed = (float) $sec + ((float) $usec * 100000); // seed random generator srand($seed); // return random number return rand($min,$max); } ?> Since the min is 1000, it will never be '1'. Hope this helps, Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php