Home page after successfully login

Login form
After successfully login , member will be redirected to home page. At login stage before the redirection, based on the outcome of checking of login credentials, the session variables are created to maintain the state of the user.

At home page we will check these session variables and accordingly display messages to logged in visitors.
To read the sessions the page must start the session before sending any output to browser

Checking of Session

if (isset($_SESSION['userid']&& !empty($_SESSION['userid']))) {
// Welcome message 
}else {
// Ask the user to login
Welcome subhendu15

You should see this message if you are successfully logged in.

Your session data is here .


To check , you can LOGOUT and visit this page again.

Message to show if user is not logged in.

System will not redirect the user to home page if user is not successfully logged in, however user can use history or can directly type of the address of home page and arrive at the page meant for only logged in users. In such cases we will show a message asking the user to login to continue using the page.
You have not logged in .

Your session data is here .


You can LOGIN and visit this page again.


* 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 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer