Good day guys. Anyone can tell me how to send to email a random password when they register? Thanks 🙂
Help registration lavalair
Started on the old forum in April 2012 · view the original in the archive · old links redirect here
stratosphere wrote: Good day guys. Anyone can tell me how to send to email a random password when they register? Thanks :)
$random_number = rand(5000000000,9000000000);
$rform .= "Your Password:<br/><input type=\"hidden\" name=\"pwd\" value=\"$random_number\"/><br/>";
$rform .= "Retype Password:<br/><input type=\"hidden\" name=\"cpw\ value=\"$random_number\"/><br/>";
something like this
$gen_pass = rand(11111,99999);
// remove the password input field in your registration form.
// inserting in ur sql
password='".$gen_pass."'
// mail it
$message = "Helo, this is your password: .$gen_pass.";
$check = mail("abc@example.com", $message, "Registration@mysite.com");
if($check){
echo "Mail sent!";}
It's n0t that i am afraid to die. Its just that if i die, wh0 wilL loVe her as muCh as i Do?
did you mean like this on core?
$rform .= "$ue Screename:(lowercase)<br/><input name=\"uid\" format=\"*x\" maxlength=\"8\" value=\"$uid\"/><br/>";
$gen_pass = rand(11111,99999);
pwd='".$gen_pass."'
look for registration successfully completed.. then put this below..
$time = time();
$pass = md5($time);
$newpass= substr($pass,0,6);
////send password to user email using phpmail
$msg = "Your password: ".$newpass."";
$subj = "Registration detailss";
$headers = 'xdos' . "\r\n" .
'Reply-To: jhunwap@gmail.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($email, $subj, $msg, $headers);
///now insert/ update the password of the user
Meet New FACES and Gain More FRIENDS!!! http://www.facesnfriends.com%208%29
I got this but everytime i check my email and try to login it says wr0ng password, how to fix this? Thanks
if($tolog)
{
$time = time();
$pass = md5($time);
$newpass= substr($pass,0,6);
$msg = "\n Username: ".$uid." \n Password: ".$newpass." \n Security Answer: ".$answer." \n\n Welcome! \n\n haha is a nice friendly chat community that offers lot of exciting and new features. We are glad to have you with us! \n Please feel free to invite your friends along. \n\n Follow the link below to login into your account directly \n http://haha.info/in.php?u=".$uid."&p=".$newpass." \n\n Best Regards, \n Keep";
$subj = "Registration Details";
$headers = 'From: noreply@site' . "\r\n" .
'Reply-To: [email]wah@gmail.com[/email]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($email, $subj, $msg, $headers);
}else{
echo "<a href=\"index.php\">";
echo "Home</a>";
}
like this?
if($tolog)
{
$time = time();
$pass = md5($time);
$newpass= substr($pass,0,6);
mysql_query("UPDATE r0bz_r0b_users SET pass='".$pwd."' WHERE id='".$uid."'");
{
stratosphere wrote: I got this but everytime i check my email and try to login it says wr0ng password, how to fix this? Thanks
give me your registration form/proccess and registration funtion in your core.php ill fixed it for u.. or
Added after 10 minutes:
stratosphere wrote: like this? if($tolog) { $time = time(); $pass = md5($time); $newpass= substr($pass,0,6); mysql_query("UPDATE r0bz_r0b_users SET pass='".$newpass."' WHERE id='".$uid."'"); {
yes!!!!! if u will only update a password,... in registration find register funtion in your core, funtion register() /////
$time = time();
$pass = md5($time);
$newpass= substr($pass,0,6);
mysql_query("INSERT INTO r0bz_r0b_users SET BALA, BLA, BLA pass='".$newpass."' ");
Meet New FACES and Gain More FRIENDS!!! http://www.facesnfriends.com%208%29
heres my registration and core. Thanks for your help guys i really appreciate it
stratosphere wrote: heres my registration and core. Thanks for your help guys i really appreciate it
heres the code, i just edit ur icore....
in your register.php
remove this:
$msg = "\n Username: ".$uid." \n Password: ".$pwd." \n Security Answer: ".$answer." \n\n Welcome! \n\n Wap is a
nice friendly chat community that offers lot of exciting and new features. We are glad to have you with us! \n
Please feel free to invite your friends along. \n\n Follow the link below to login into your account directly \n
http://mfilez.tk/in.php?u=".$uid."&p=".$pwd." \n\n Best Regards, \n robPROJECT";
$subj = "Registration Details";
$headers = 'From: noreply@admin' . "\r\n" .
'Reply-To: me@gmail.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($email, $subj, $msg, $headers);
echo "<br/><a href=\"index.php\">Home</a>";
Meet New FACES and Gain More FRIENDS!!! http://www.facesnfriends.com%208%29
xdosx wrote: give me your registration form/proccess and registration funtion in your core.php ill fixed it for u.. or
Added after 10 minutes:
yes!!!!! if u will only update a password,... in registration find register funtion in your core, funtion register() /////
$time = time(); $pass = md5($time); $newpass= substr($pass,0,6); mysql_query("INSERT INTO r0bz_r0b_users SET BALA, BLA, BLA pass='".$pwd."' ");
xdosx wrote: heres the code, i just edit ur icore....
in your register.php
remove this:
$msg = "\n Username: ".$uid." \n Password: ".$pwd." \n Security Answer: ".$answer." \n\n Welcome! \n\n Wap is a nice friendly chat community that offers lot of exciting and new features. We are glad to have you with us! \n Please feel free to invite your friends along. \n\n Follow the link below to login into your account directly \n http://mfilez.tk/in.php?u=".$uid."&p=".$pwd." \n\n Best Regards, \n robPROJECT"; $subj = "Registration Details"; $headers = 'From: noreply@admin' . "\r\n" . 'Reply-To: me@gmail.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($email, $subj, $msg, $headers); echo "<br/><a href=\"index.php\">Home</a>";
thanks but it still wr0ng password sending in email 🙁
stratosphere wrote: thanks but it still wr0ng password sending in email :(
if u dont mind let me check ur site, if u edit the one that i attached im sure it will not work.. in register.php u have a code
$msg = "\n Username: ".$uid." \n Password: ".$pwd." \n Security Answer: ".$answer." \n\n Welcome! \n\n Wap is a nice friendly chat community that offers lot of exciting and new features. We are glad to have you with us! \n Please feel free to invite your friends along. \n\n Follow the link below to login into your account directly \n http://mfilez.tk/in.php?u=".$uid."&p=".$pwd." \n\n Best Regards, \n robPROJECT";
$subj = "Registration Details";
$headers = 'From: noreply@admin' . "\r\n" .
'Reply-To: me@gmail.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($email, $subj, $msg, $headers);
echo "<br/><a href=\"index.php\">Home</a>";
remove that coz i included it already to ur register function. here:
function register($name,$pass,$usex,$bday,$email,$invited,$answer,$ubr)
{
$execms = mysql_query("SELECT * FROM r0bz_r0b_users WHERE name='".$name."';");
if (mysql_num_rows($execms)>0){
return 1;
}else{
////new password
$time = time();
$pass = md5($time);
$newpass= substr($pass,0,6); //this will be the new password.... 6 char password
$reg = mysql_query("INSERT INTO r0bz_r0b_users SET name='".safe(cleanInput($name))."', pass='".safe(cleanInput($newpass))."', birthday='".safe(cleanInput($bday))."', emailadd='".safe(cleanInput($email))."', invited='".safe(cleanInput($invited))."', secquest='".safe(cleanInput($answer))."', sex='".safe(cleanInput($usex))."', regdate='".time()."', ipadd='".getip()."', myname='".safe(cleanInput($name))."', lastact='0', lastvst='".time()."', onlinetime='0', resetime='".time()."', browserm='".safe(cleanInput($ubr))."'");
if ($reg)
{
$referal = mysql_fetch_array(mysql_query("SELECT id FROM r0bz_r0b_users WHERE name='".$invited."'"));
$text = "$name registered successfully in our site using your name as referal.[br/]Keep inviting more friends for more credits -up- [br/] Note: This Is An Automatic Pm";
mysql_query("INSERT INTO r0bz_r0b_private SET text='".$text."', byuid='1', touid='".$referal[0]."', timesent='".time()."'");
mysql_query("UPDATE r0bz_r0b_users SET refered=refered+1 WHERE id='".$referal[0]."'");
$uid = mysql_fetch_array(mysql_query("SELECT id FROM r0bz_r0b_users WHERE name='".$name."'"));
//////this will send ur password to ur email........
$msg = "\n Username: ".$name." \n Password: ".$newpass." \n Security Answer: ".$answer." \n\n Welcome! \n\n haha is a nice friendly chat community that offers lot of exciting and new features. We are glad to have you with us! \n Please feel free to invite your friends along. \n\n Follow the link below to login into your account directly \n http://haha.info/in.php?u=".$uid."&p=".$newpass." \n\n Best Regards, \n Keep";
$subj = "Registration Details";
$headers = 'From: noreply@site' . "\r\n" .
'Reply-To: [email]wah@gmail.com[/email]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($email, $subj, $msg, $headers);
/////autopm
$msg = "Hello /reader A Warm Greetings From Your Wap Family!![br/]We hope that you will goin to enjoy your stay and get satisfied with our site great features. You can approach any staff on duty if you have queries regarding to our site.[br/]Please read our site /terms to evade penalties.Dont forget to click our site ads to maintain our site and invite your friends here,[br/]Thank You So Much.!! -banana-[br/]This Is An Automated Welcome Message";
$msg = mysql_escape_string($msg);
autopm($msg, $uid[0]);
return 0;
}else{
return 2;
}
}
}
Meet New FACES and Gain More FRIENDS!!! http://www.facesnfriends.com%208%29
xdosx wrote: if u dont mind let me check ur site, if u edit the one that i attached im sure it will not work.. in register.php u have a code
$msg = "\n Username: ".$uid." \n Password: ".$pwd." \n Security Answer: ".$answer." \n\n Welcome! \n\n Wap is a nice friendly chat community that offers lot of exciting and new features. We are glad to have you with us! \n Please feel free to invite your friends along. \n\n Follow the link below to login into your account directly \n http://mfilez.tk/in.php?u=".$uid."&p=".$pwd." \n\n Best Regards, \n robPROJECT"; $subj = "Registration Details"; $headers = 'From: noreply@admin' . "\r\n" . 'Reply-To: me@gmail.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($email, $subj, $msg, $headers); echo "<br/><a href=\"index.php\">Home</a>";remove that coz i included it already to ur register function. here:
function register($name,$pass,$usex,$bday,$email,$invited,$answer,$ubr) { $execms = mysql_query("SELECT * FROM r0bz_r0b_users WHERE name='".$name."';"); if (mysql_num_rows($execms)>0){ return 1; }else{ ////new password $time = time(); $pass = md5($time); $newpass= substr($pass,0,6); //this will be the new password.... 6 char password $reg = mysql_query("INSERT INTO r0bz_r0b_users SET name='".safe(cleanInput($name))."', pass='".safe(cleanInput($newpass))."', birthday='".safe(cleanInput($bday))."', emailadd='".safe(cleanInput($email))."', invited='".safe(cleanInput($invited))."', secquest='".safe(cleanInput($answer))."', sex='".safe(cleanInput($usex))."', regdate='".time()."', ipadd='".getip()."', myname='".safe(cleanInput($name))."', lastact='0', lastvst='".time()."', onlinetime='0', resetime='".time()."', browserm='".safe(cleanInput($ubr))."'"); if ($reg) { $referal = mysql_fetch_array(mysql_query("SELECT id FROM r0bz_r0b_users WHERE name='".$invited."'")); $text = "$name registered successfully in our site using your name as referal.[br/]Keep inviting more friends for more credits -up- [br/] Note: This Is An Automatic Pm"; mysql_query("INSERT INTO r0bz_r0b_private SET text='".$text."', byuid='1', touid='".$referal[0]."', timesent='".time()."'"); mysql_query("UPDATE r0bz_r0b_users SET refered=refered+1 WHERE id='".$referal[0]."'"); $uid = mysql_fetch_array(mysql_query("SELECT id FROM r0bz_r0b_users WHERE name='".$name."'")); //////this will send ur password to ur email........ $msg = "\n Username: ".$name." \n Password: ".$newpass." \n Security Answer: ".$answer." \n\n Welcome! \n\n haha is a nice friendly chat community that offers lot of exciting and new features. We are glad to have you with us! \n Please feel free to invite your friends along. \n\n Follow the link below to login into your account directly \n http://haha.info/in.php?u=".$uid."&p=".$newpass." \n\n Best Regards, \n Keep"; $subj = "Registration Details"; $headers = 'From: noreply@site' . "\r\n" . 'Reply-To: wah@gmail.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($email, $subj, $msg, $headers); /////autopm $msg = "Hello /reader A Warm Greetings From Your Wap Family!![br/]We hope that you will goin to enjoy your stay and get satisfied with our site great features. You can approach any staff on duty if you have queries regarding to our site.[br/]Please read our site /terms to evade penalties.Dont forget to click our site ads to maintain our site and invite your friends here,[br/]Thank You So Much.!! -banana-[br/]This Is An Automated Welcome Message"; $msg = mysql_escape_string($msg); autopm($msg, $uid[0]); return 0; }else{ return 2; } } }
i didnt edit the one you attached i think theres a code need to change in register.php? 🙁
re
stratosphere wrote: i didnt edit the one you attached i think theres a code need to change in register.php? :(
to recieve actul pass word in the lavalair script use the function
if($tolog)
{
echo "Registration completed successfully!<br/>";
echo "<br/><b>Username: </b>$uid<br/>";
echo "<b>Password: </b>$pwd<br/><br/>";
}
}else{
}
External image (may be gone) External image (may be gone)
*****
**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***