Help registration lavalair

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help registration lavalair

    Good day guys. Anyone can tell me how to send to email a random password when they register? Thanks

    #2
    Originally posted by stratosphere View Post
    Good day guys. Anyone can tell me how to send to email a random password when they register? Thanks
    PHP Code:
    $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

    Comment


      #3
      thanks but not working

      Comment


        #4
        PHP Code:
        $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?

        Comment


          #5
          nice, i need this too...where do i put this code??in register.php or in core.php??

          Comment


            #6
            if you are using lavalair you must put it on core.php where auto message and registration details insert to mysql are there. If i'm n0t mistaken the name of that function is last_check.
            It's n0t that i am afraid to die. Its just that if i die, wh0 wilL loVe her as muCh as i Do?

            Comment


              #7
              i cant find where can i put that code

              Comment


                #8
                Just put it in the part wherein everything goes fine after the input checks or where "registration complete" message is located.
                It's n0t that i am afraid to die. Its just that if i die, wh0 wilL loVe her as muCh as i Do?

                Comment


                  #9
                  did you mean like this on core?
                  PHP Code:
                     $rform .= "$ue Screename:(lowercase)<br/><input name=\"uid\" format=\"*x\" maxlength=\"8\" value=\"$uid\"/><br/>";
                  $gen_pass rand(11111,99999);
                   
                  pwd='".$gen_pass."' 
                  Last edited by arnage; 27.04.12, 20:22.

                  Comment


                    #10
                    look for registration successfully completed..
                    then put this below..
                    PHP Code:
                    $time time();
                    $pass md5($time);
                    $newpasssubstr($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 

                    Comment


                      #11
                      I got this but everytime i check my email and try to login it says wr0ng password, how to fix this? Thanks

                      PHP Code:
                       if($tolog)
                      {
                      $time time();
                      $pass md5($time);
                      $newpasssubstr($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>";

                      Last edited by arnage; 27.04.12, 20:08.

                      Comment


                        #12
                        You need to insert in database that newly generated password for particular user.
                        <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

                        Comment


                          #13
                          like this?
                          PHP Code:
                          if($tolog)
                          {
                          $time time();
                          $pass md5($time);
                          $newpasssubstr($pass,0,6);
                          mysql_query("UPDATE r0bz_r0b_users SET pass='".$pwd."' WHERE id='".$uid."'");

                          Last edited by arnage; 28.04.12, 17:24.

                          Comment


                            #14
                            Originally posted by stratosphere View Post
                            I got this but everytime i check my email and try to login it says wr0ng password, how to fix this? Thanks[/PHP]
                            give me your registration form/proccess and registration funtion in your core.php ill fixed it for u.. or

                            Added after 10 minutes:

                            Originally posted by stratosphere View Post
                            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()
                            /////
                            PHP Code:
                            $time time();
                            $pass md5($time);
                            $newpasssubstr($pass,0,6);
                            mysql_query("INSERT INTO r0bz_r0b_users SET  BALA, BLA, BLA pass='".$newpass."' "); 
                            Last edited by xdosx; 28.04.12, 06:54.

                            Comment


                              #15
                              heres my registration and core. Thanks for your help guys i really appreciate it
                              Attached Files

                              Comment

                              Working...
                              X