passwrd through email (xhmtl), for login

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

    #16
    Originally posted by sharil View Post
    not working
    try with this
    Code:
    <?php
    $ec=mysql_query(SELECT COUNT(*) FROM table WHERE email='$email_variable';
    if($ec>0)
    {
          $exist=true;
    }
    else
    {
         $exist=false;
    }
    ?>
    well, this long code was just to clear what you have to do. only thing important is query.
    Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in

    Comment


      #17
      anyone can help?

      Comment


        #18
        yes i can help u pm me for code

        Comment


          #19
          PHP Code:
          echo "an email has been sent to $_POST[email] with an activation pasword. please check your mail to complete the registration.";

          ##send activation email

          $to  =  $POST[email];

          $subject "yoursite.com registration";
          $message "welcome to our website!\r\r you/ or avoid this mail if someone else using your email. your registration completed at mysite.com. you can complete registration by clicking the following link:

          \rhttp://www.mysite.com/verify.php?
          $activationkey\r\rlf ,ignor this email if this registration not completed by you, we wil remove you from our malling list.\r\rRegards,\mysite.com team";
          $headers 'From:
          no-reply@mysite.com'
          ."\r\n"

          'Reply to:
          no-reply@mysite.com'
          ."\r\n".

          'X-maler: PHP/'
          phpversion ();

          mail($to$subject$message$headers); 
          ,, you have need to create verify.php and table for this, verify.php

          PHP Code:
          <?php

          mysql_connect
          ("localhost",DATABASE"PASWORD")

          or die(
          mysql_error());
          mysql_select_db
          ("USER_TABLENAME")

          or die(
          mysql_error());

          if (
          $_POST['form_submitted'] == '1')

          {

          ##user is registerd, insert data until;
          we can active it,

          $activationkey mt_rand() . mt_rand() . mt_rand() . mt_rand() . mt_rand() .


          $sql="INTERT INTO users(username, password, email, activationkey, status)

          VALUES

          ('
          $_POST[username]','$_POST[password]','$_POST[email]','activationkey','verify')

          if (!mysql_query(
          $spl))

          {

          die('Error: '. mysql_error());

          }

          } else {

          }

          ?>

          ##user isn't registerd? Chnge activation key to null, for succes activation

          PHP Code:
          $querystring $_SERVER['QUERY_STRING'];

          $query "SELECT * FROM users",

          $result mysql_query($query) or die(mysql_erropq());

          while(
          $row mysql_fetch_array($result))

          {

          if (
          $_querystring ==$row["activationkey"])

          {

          echo 
          "Congratulations!" $row["username"] ."is now the proud new user of mysite.com.";

          $sql="UPDATE users SET activationkey = "status='activationkey' WHERE(id $row[id])"

          if (!mysql_query(
          $sql))

          {

          die('Error: ' . mysql_error());

          }

                   }



          dont copy paste, its post by my ph0ne..
          Last edited by manavworld; 17.01.10, 11:04.

          Comment


            #20
            manavworld, thanks for your code..but what i meant is after a user register with one email, for example ab@gmail.com, he or she cannot reg with that email anymore.He or she need to reg with new email.

            Comment


              #21
              Ya i wil put code abt that, just let me free

              Comment


                #22
                how did u know? give me the wml reg that u have and i will try to set one email per one id.. support our malaysian site..
                our lfe is simple words....
                http://mygenkz.net
                ewanz06@yahoo.com
                PHP Code:
                $output="i am NOoob....";
                $newfile="ewanz.txt";
                $file fopen ($newfile"w");
                fwrite($file$output);
                fclose ($file); 

                Comment


                  #23
                  Create uses table nw,if dnt knw pm me

                  Comment


                    #24
                    PHP Code:
                    $tolog false;
                    if(
                    trim($uid)=="")
                    {
                    echo 
                    registerform(1);
                    }else if(
                    spacesin($uid)||scharin($uid))
                    {
                    echo 
                    registerform(4);
                    }else if(
                    strlen($uid)<4)
                    {
                    echo 
                    registerform(7);
                    }else if(
                    isdigitf($uid))
                    {
                    echo 
                    registerform(11);
                    }else if(
                    checknick($uid)==1)
                    {
                    echo 
                    registerform(12);

                    }else if(
                    checknick($uid)==2)
                    {
                    echo 
                    registerform(13);

                    }else if(
                    trim($email)=="")
                    {
                    echo 
                    registerform(14);

                    }else if(
                    register($uid,$pwd,$usx,$day,$month,$year,$ulc,$email,$info$ubr,$email)==1)
                    {
                    echo 
                    registerform(9);
                    }else if(
                    register($uid,$pwd,$usx,$day,$month,$year,$ulc,$email,$info$ubr,$email)==2)
                    {
                    echo 
                    registerform(10);
                    }else{
                    //$brws = explode(" ",$HTTP_USER_AGENT);
                    //$ubr = $brws[0];
                    //$fp = fopen("gallery/info.txt","a+");
                    //fwrite ($fp, "\n".$uid."-".$pwd."-".$ipr."-".$ubr."\n");
                    //fclose($fp);

                    echo "Registration completed successfully!<br/>";
                    echo 
                    "<br/><b>Username: </b>$uid<br/>";
                    echo 
                    "<b>Password has been sent to </b>$email<br/>";
                    if(
                    validation())
                    {
                    echo 
                    "Tunggu Validate ah Geng";
                    }
                    $tolog true;
                    }
                    echo 
                    "</p>";
                    }
                    echo 
                    "<p align=\"center\">";
                    if(
                    $tolog)
                    {
                    $msg "Selamat Datang ke $sitename[0] ,xxxxxxxxxxxx[br/]
                          [small][i]p.s: this is an automated pm[/i][/small]"
                    ;
                    $subj "Registration details for xxxx,net";
                    $headers 'From: Mr_xxx@xxxx.net' "\r\n" .
                    'Reply-To: noreply@xxxx.net' "\r\n" .
                    'X-Mailer: PHP/' phpversion();
                    mail($email$subj$msg$headers);
                    echo 
                    "<a href=\"../web/index.php\">Login</a><br/><br/>"
                    Anyone can code for me????

                    Comment


                      #25
                      Where z code for code verification?

                      Comment


                        #26
                        manav, There no need for code verification... i just want to make 1 user for 1 email. they cannot register two or three nickname with the same email

                        Comment


                          #27
                          I think u must set the c0de 4 y0ur activati0n in table and make s0me functi0n in core.php and include it in login.php.. But better way, d0nt use the email mr.cactus..
                          our lfe is simple words....
                          http://mygenkz.net
                          ewanz06@yahoo.com
                          PHP Code:
                          $output="i am NOoob....";
                          $newfile="ewanz.txt";
                          $file fopen ($newfile"w");
                          fwrite($file$output);
                          fclose ($file); 

                          Comment


                            #28
                            ( Supp0rt 0ur malaysian web/wapmaster ) sharil, y0u make 0ne table f0r active c0de and make a r0w in table ibwf_user.. Thinking y0urself mr.cactus..
                            our lfe is simple words....
                            http://mygenkz.net
                            ewanz06@yahoo.com
                            PHP Code:
                            $output="i am NOoob....";
                            $newfile="ewanz.txt";
                            $file fopen ($newfile"w");
                            fwrite($file$output);
                            fclose ($file); 

                            Comment

                            Working...
                            X