Simple Login logout system using php

Must Read : Simple Login logout system using php

Login and logout system is the most important thing for the user management, session management is one important thing for manage the user for the whole time of login time. for that we have to use session for this. it should have 5 files for this. we have to fetch the same value for the user and check the session and register the session value. and make destroy for logout. let see it detail,
it should need 5 files for this login-logout system, they are
  1. login/index page
  2. datafetch/usercheck page
  3. session/check page
  4. welcome/profile page
  5. logout page

the above files must me needed for this. we can named it as our wish. let see what i done here.

database name –> wearecoders
table name –> login

DB.PHP

INDEX.PHP

in the index page we have to start the session, as the above mentioned. action is performed in login.php page.

LOGIN.PHP

if the session is registered then go to check the profile.php page there session.php file is included so the session is checked.

SESSION.PHP

check the session value is correct or not. if the session is value is not set, then again redirect to index.php page.

PROFILE.PHP

assign the logout.php page in the profile.php page.

LOGOUT.PHP

in the logout.php page, we should unset or destroy the session value as the above you seen. then locate to index.php page.
and we should have to start the session in all the page.

(Visited 98 times, 1 visits today)

Leave a Comment.