Jump to content

Pincode registration


seyz4all

Recommended Posts

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
Share on other sites

  • 2 months later...

<?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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.