same email cant register (ibwf)

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

    same email cant register (ibwf)

    hi all wapmasters...have a nice day... i just tried to add a new thing in lavalair register form..when some one try to register it will automatic chek users email address...if they provide unique email then it will succees otherwise it will exit();

    here is the php code ///////////

    //////////////////ibwf reg page

    PHP Code:
    $dupemail=mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users where email ='$email'"));

    if (
    $_REQUEST['email'] !=$dupemail[0])


    echo
    "regiter ok";
    /////////////register process

    }else{

    echo
    "this email is already used try another";
    exit();


    note: i cant run it....what is the problem in this code??
    any1 recode it..

    //////////////////////
    ///////
    //
    /

    #2
    Try This One:
    PHP Code:
    $email htmlspecialchars(mysql_real_escape_string($_POST['email']));
    $results mysql_query("select count(*) email from ibwf_user where email = '$email'");
    $count mysql_fetch_assoc($results);
    if (
    $count['email'] > 0) {echo "This Email <b>$email</b> Already Registered.Try Another Valid email.<br>";}else {echo "Register Ok.<br>";} 

    Comment


      #3
      Originally posted by shakil420 View Post
      note: i cant run it....what is the problem in this code??
      PHP Code:
      $dupemail=mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users where email ='".htmlspecialchars(mysql_real_escape_string($_REQUEST['email']) ."'")); 
      Originally posted by khan89 View Post
      Try This One:
      PHP Code:
      $email htmlspecialchars(mysql_real_escape_string($_POST['email']));
      $results mysql_query("select count(*) email from ibwf_user where email = '$email'");
      $count mysql_fetch_assoc($results);
      if (
      $count['email'] > 0) {echo "This Email <b>$email</b> Already Registered.Try Another Valid email.<br>";}else {echo "Register Ok.<br>";} 
      does it need to be:

      PHP Code:
      $count mysql_fetch_assoc($results[0]); 

      Comment


        #4
        Code:
        $email = htmlspecialchars(mysql_real_escape_string($_POST['email']));
        $results = mysql_query("select count(*) email from ibwf_user where email = '$email'");
        $count = mysql_fetch_assoc($results);
        if($email>$count[email])
        {
        $error = true;
        $errmessage = "Same email you can't use it!";
        }
        Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
        Visit: WapMasterz Coming Back Soon!
        _______
        SCRIPTS FOR SALE BY SUBZERO
        Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
        FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
        _______
        Info & Tips
        php.net
        w3schools.com

        Comment


          #5
          Originally posted by subzero View Post
          Code:
          $email = htmlspecialchars(mysql_real_escape_string($_POST['email']));
          $results = mysql_query("select count(*) email from ibwf_user where email = '$email'");
          $count = mysql_fetch_assoc($results);
          if($email>$count[email])
          {
          $error = true;
          $errmessage = "Same email you can't use it!";
          }
          how to use it? please share

          Comment


            #6
            100% working thanx @khan 89

            Comment


              #7
              PHP Code:
              $checkemail mysql_query("SELECT email FROM users WHERE email = '$email'") or die(mysql_error());
              $showresultemail mysql_num_rows($checkemail);
              if(
              $showresultemail != 0)
              {
              echo 
              "<br/>$email <br/>is already in use !<br/><a href=\"registration_page.php\">Try again=></a>";
              die(
              mysql_error());
              }
              else
              {
              echo 
              "OK... or whatever...";

              It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
              ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
              ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
              キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

              Comment


                #8
                Originally posted by metulj View Post
                PHP Code:
                $checkemail mysql_query("SELECT email FROM users WHERE email = '$email'") or die(mysql_error());
                $showresultemail mysql_num_rows($checkemail);
                if(
                $showresultemail != 0)
                {
                echo 
                "<br/>$email <br/>is already in use !<br/><a href=\"registration_page.php\">Try again=></a>";
                die(
                mysql_error());
                }
                else
                {
                echo 
                "OK... or whatever...";

                but lavalair register form not like this? error message show from core.php how to use with lavalair tell please

                Comment


                  #9
                  Originally posted by i_love_php_mysql View Post
                  but lavalair register form not like this?
                  error message show from core.php how to use with lavalair tell please
                  code is meant for general usage...
                  so anyone can modify it for any script...
                  It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
                  ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
                  ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
                  キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

                  Comment


                    #10
                    @@i_love_php_mysql "how to use it? please share"

                    /////welll open ur register.php page then add the code .may b its still not clear to u ! explore coding-talk learn more

                    Comment


                      #11
                      very confusing script it is.

                      Comment


                        #12
                        only one minor update to change it to lavalair ???
                        change:
                        $checkemail = mysql_query("SELECT email FROM users WHERE email = '$email'") or die(mysql_error());
                        to:
                        $checkemail = mysql_query("SELECT email FROM ibwf_users WHERE email = '$email'") or die(mysql_error());

                        confusing?????

                        if u still cant get it working there is a pre-scripted one for lavalair somewhere in forum :P

                        Added after 8 minutes:

                        or another alternative if you still cant do it is to open up your database and enter this in your sql box:
                        PHP Code:
                        ALTER TABLE `ibwf_usersADD UNIQUE (`email`) 
                        Last edited by something else; 15.09.10, 20:41.

                        Comment


                          #13
                          that is a good idea but then how would i print error message using those switch case from core.php and print it on regsiter.php that email already registered etc?

                          Comment


                            #14
                            iv already posted a complete version of this for lavalair somewhere in this forum (not to long ago).... so i cant be bothered to code it again :P
                            use this:

                            Comment


                              #15
                              tell the name or how will i know which script? i see soo many i do not know which one to use.

                              Comment

                              Working...
                              X