Signup : User confirmation of Email

Member Posting of verification Email
The user can login to its mail box and open the welcome mail with the link. The welcome mail will have the link with all the required data as uqery string. On clicking the link , the browser will open the verification page at server and submit the following data.
$mem_id=$_GET['mem_id'];
$status_id=$_GET['status_id'];
$email=$_GET['email'];
$userid=$_GET['userid'];
$word=$_GET['word'];

Read this to understand how data is passed using query string

By using the status_id we will collect all other details like userid, email, word, status, mem_id, from the mem_status table by using SELECT Query.

The status is expected to have two options .

B : The confirmation mail is posted and the user has not yet responded
C : User has confirmed the mail by visiting the link and submitted all matching data


We will check the status value and by using switch function run the code blocks.

If status is B , then both tables mem_signup and mem_status are updated with status = C , for this following steps are taken .
case 'B':    
if($userid==$row->userid && $word==$row->word && $email==$row->email && $mem_id==$row->mem_id){
// update mem_signup table with status=C
// update mem_status table with status=C
//--
}else{
$msg .=" You have followed a wrong link , Please check your email again  ";
$msg_status='danger';	
}	
break;
All data ( userid, email, mem_id, word ) are matched with stored data against status_id. If the data is matching then the status field of mem_signup and mem_status table are updated to C .

If status is C , then message is given to user saying the email address is already confirmed so they can login.
switch ($status){
case 'C':    
$msg .=" You have already confirmed your email address, You can <a href=login.php>Login</a> ";
$msg_status='info';
break;
	
	-----
}


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here .







    Most Popular JQuery Scripts

    1

    Two dependant list boxes

    2

    Calendar with Date Selection

    3

    Data change by Slider

    4

    Show & Hide element


    JQuery Video Tutorials




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer