Signup : Login , verification & Logout

Verification of user Email
Login verfication and Session After verification of email address, user can login by using their userid and password. System will check userid , password and status of the member by comparing the user input data with mysql table.

Login form

We will ask the user to enter userid and password in the textbox provided. In this page we will proved two more links saying Forgot password and Signup. The submit button in the form will send the userid , password to backend script for verification.

Posting of data to backend script is done using JQuery Post method. After verification at backend script we get the message saying about success or failure of validation.

Backend Script for authentication

We receive the userid and password at backend script by using POST method.
We collect the matching records from database by using the userid and then check the password is matching with user entered password or not. We will also check status of the user as it must be equal to C to ensure only email verified users are allowed to login.
The query matching to all these conditions is here.
SELECT userid, password,mem_id FROM mem_signup  WHERE userid=? and status = 'C'
By using SELECT query we get the matching data for the user entered userid.

Matching password.

We used password_verify() to match the stored passwod against user entered password.
 // create the session and welcome message 
}else { 
// Failure of login 

Creating Session

We create Session Variables once the user is successfully logged in

Sending back the message to login page.

Based on the outcome of checking the userid and password , we will send message to main login.php page after creating session ( if successfully logged in ). Based on this outcome we will redirect the member to home page (index.php).

Additional features

Number of failed attempts
Storing IP details
Expire of Page
Redirect to referrer page.


* 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