Results 1 to 2 of 2

Thread: After email conformation

  1. #1
    Join Date
    Aug 2006

    After email conformation

    Hi, Iím not sure why this not working, Iím trying to create signup form with email confirmation, they are two different table name in mysql one is called temps_users and other use us users.
    When new member signed up it sending all of the new member profile to the temps_user tables, until member verify email by email conformation, if confirm then it will transfer the profile from temps_users to users tables and delete profile in temps_users.
    So far I have done that and works great when transfer from temps_users to users, but after transfer the data profile from temps_users to users, meaning member are activity, I want to redirect to login.php page for them to login in before get into the member home page, the problem I have is that is not redirect to login.php page and delete profile from temps_users.

    Please see the code area where it said $result2=mysql_query($sql); (see in bold area)
    From that line is suppost to be redirect to login.php page and delete profile from temps_users.
    Is not working what did I missed!

    // Passkey that got from link 
    // Retrieve data from table where row that match this passkey 
    $sql1="SELECT * FROM temps_users WHERE confirm_code ='$passkey'";
    // If successfully queried 
    // Count how many row has this passkey
    // if found this passkey in our database, retrieve data from table "temp_members_db"
    // Insert data that retrieves from "temp_members_db" into table "registered_members" 
         $sql2=mysql_query("INSERT INTO users(username,password,email,type,first_name,last_name )VALUES('$username','$password','$email','$type','$first_name','$last_name' )");
    	    $sql=mysql_query("SELECT uid FROM users WHERE username='$username'");
         $friend_query=mysql_query("INSERT INTO friends(friend_one,friend_two,role)VALUES('$uid','$uid','me')");
         return $uid ;
    // if not found passkey, display message "Wrong Confirmation code" 
    else {
    echo "Wrong Confirmation code";
    // if successfully moved data from table"temp_members_db" to table "registered_members" displays message "Your account has been activated" and don't forget to delete confirmation code from table "temp_members_db"
    // Delete information of this user from table "temp_members_db" that has this passkey 
    $sql3="DELETE FROM temps_users WHERE confirm_code = '$passkey'";

  2. #2
    Join Date
    May 2004
    chennai, tamil nadu, India
    "INSERT INTO friends(friend_one,friend_two,role)VALUES('$uid','$uid','me')")
    Is the above SQL statement getting executed correctly ?
    Chris, Senior Developer,
    Php laravel developers,

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center