seyz4all Posted May 14, 2008 Share Posted May 14, 2008 Hi everyone, i have seen so many website that requires a pincode and serial no to signup, then when loging in, you would use ur pincode and ur own password. i believe the pincode and serial nos are already in the database b4 the registration was made, cos one wld use d pincode and serial no to register. Pls I have been searching for scripts like dis, but cant find it. Or if anyone has a script like dat. Guys please help me out. Link to comment https://forums.phpfreaks.com/topic/105611-pincode-registration/ Share on other sites More sharing options...
azfar siddiqui Posted July 16, 2008 Share Posted July 16, 2008 <?php function RandomString($m,$mx,$isspecial=null) { $min = $m; $max = $mx; $passwd = ""; $passwdstr = "abcdefghijklmnopqrstuvwxyz"; $passwdstr .= strtoupper($passwdstr); $passwdstr .= "12345678901234567890"; for($i=0; $i<=strlen($passwdstr) - 1; $i++) { $passwdchars[$i]=$passwdstr[$i]; } srand ((float)microtime()*1000000); shuffle($passwdchars); $length = rand($min,$max); for($i=0; $i<$length; $i++) { $charnum = rand(0, count($passwdchars) - 1); $passwd .= $passwdchars[$charnum]; } return htmlentities($passwd); } ?> This function generates pin numbers.. what happens in real scenario is that , a pin is generated , and an entry is made into the table , i.e. a pin is assigned to the user id . Link to comment https://forums.phpfreaks.com/topic/105611-pincode-registration/#findComment-591407 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.