Home page after successfully loginAfter 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
Welcome subhendu15
You should see this message if you are successfully logged in. Your session data is here . $_SESSION['id']=972m07otal2lv5gkv3o7l26os2 $_SESSION['userid']=subhendu15 $_SESSION['mem_id']=15 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 . $_SESSION['id']= $_SESSION['userid']= $_SESSION['mem_id']= You can LOGIN and visit this page again.
Features with Tutorials
Signup page with all validations
Welcome page after signup asking user to check & verify email
Verification of Email address
Login Page after verifiction of email
Home page for logged in users members
Logout page to destroy session variables
This article is written by plus2net.com team.
|
Most Popular JQuery Scripts | |
1 | Two dependant list boxes |
2 | Calendar with Date Selection |
3 | Data change by Slider |
4 | Show & Hide element |