Help in Registration?

Started on the old forum in June 2011 · view the original in the archive · old links redirect here

3 replies · 442 views · started 15 years ago · 1 min read

4 participants
kolkatawap Junior · 18 posts #1

Guys how to Create Registration in site if u have ful setup u want to share plz do

Hack9ja Newbie · 8 posts #2

Try using google for that

Neo

kei_ki7 Senior · 431 posts #3

Also try to search here, someone make a thread for that before. Also try to refer to some of the script

Did I help you? You can help me too Your donations will help me finance my studies.

shushant Developer · 207 posts #4

Try this

if((isset($_POST['user']))&&(isset($_POST['pass']))&&(isset($_POST['mail']))) {
    
$user = secure('user');
$pass = secure('pass');
$cpass = secure('cpass');
$mail = secure('mail');
function isValidEmail($email){
   return eregi("^[_a-z0-9-] (\.[_a-z0-9-] )*@[a-z0-9-] (\.[a-z0-9-] )*(\.[a-z]{2,3})$", $email);
}

function rndgen ($minlength, $maxlength, $useupper, $usespecial, $usenumbers)
{

$charset = "abcdefghijklmnopqrstuvwxyz";
if ($useupper) $charset .= "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if ($usenumbers) $charset .= "0123456789";
if ($usespecial) $charset .= "~@#$%^*()_ -={}|]["; // Note: using all special characters this reads: "~!@#$%^&*()_ `-={}|\\]?[\":;'><,./";
if ($minlength > $maxlength) $length = mt_rand ($maxlength, $minlength);
else $length = mt_rand ($minlength, $maxlength);
for ($i=0; $i<$length; $i  ) $key .= $charset[(mt_rand(0,(strlen($charset)-1)))];
return $key;
}

$rnd = rndgen(10,10,false,false,true);

if(!$pass==$cpass) {
    print "Pass & Confirm Pass Do Not Match !";
    die();
}

if(!isValidEmail($mail)) {
    print "Invalid Mail";
    die();
}
$pass = md5($pass);
$do = mysql_query("INSERT INTO users (user,pass,mail) VALUES ('$user','$pass','$mail')") or die("Technical Problem !");

if($do) {
    print "Registration Successfull";
}
}

 ?>
New User Registration
<form action="registerme.php" method="post">

<label for="user">UserName :</label><br />
<input size="30" maxlength="20" type="text" name="user" />
</div>

<div class="lgn">
<label for="user">Password :</label><br />
<input size="30" maxlength="20" type="password" name="pass" />
</div>

<label for="user">Confirm Password :</label><br />
<input size="30" maxlength="20" type="password" name="cpass" />

Address :</label><br />
<input size="30" maxlength="40" type="text" value="@" name="mail" />
</div>

<input type="submit" value="Register" />

</form>

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close