Signup : User Email verification through Link

Member Signup page
welcome.php page receives the newly signed users mem_id through query string. Hence it is first checked (integer or not ).
echo "Data Error";
Using this mem_id we collect userid, email address and status from the mem_table. The status column of member table will have one of the three options.

A : Just signed and verification mail is not posted to the registered email address
B : Verification mail is posted to registered email and the same is pending for confirmation
C : Confirmation received and the email address is verified so member can login

We have collected the details by using SELECT query.
if($stmt = $connection->prepare("SELECT userid,email from mem_signup   WHERE mem_id=? and status='A'")){
We create a randomly generated word ( as token ) and store the same along with mem_id, userid, email in a table mem_status. After storing we will collect the unique identification number from auto increment field of the table. This is know as status_id .

After successful signup by user , we have to verify the email address submitted by user by sending a link with one activation key. This link will contain following data which the user needs to post back to server by clicking the validation link.

status_id: Unique identification of the record against which the details are posted. ( from mem_status table )
mem_id : Unique identification of the user ( from mem_signup table )
userid : Unique identification of the user ( from mem_signup table )
email : email address from where the data has come ( from mem_signup table )
word : randomly generated word as token which is matched against record to establish authenticity. ( generated and stored in mem_status table )
So while signup, the status in mem_table is kept as A. Now we will collect the matching userid , email , and status from mem_table and create a link using them. These details we will store in mem_status table along with randomly generated word.

Here is a formatted link containing the details of the user which is posted to its email address for verification.
Once the user clicks the link from its Inbox, the link along with the data is posted to the server for verification. We will learn this in our next tutorial


* indicates required
Subscribe to plus2net

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

    Most Popular JQuery Scripts


    Two dependant list boxes


    Calendar with Date Selection


    Data change by Slider


    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 All rights reserved worldwide Privacy Policy Disclaimer