heelo sir,
my self rajesh....iam new to php.. can u please explain about logout functionality in php
Thanks & Regards
rajesh kumar.d
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Shashank SrivastavaPosted Jul 1, 2014, 10:07 PM
PHP makes use of session to maintain the user data throughout the website or app. It means, you can set any value in a session variable and you can access this value anywhere in the website at any page. The general practice is that as long as these session variables hold the values related to a particular user, that user is considered to be logged in. When we destroy the session, or reset/unset all the session values to null, the user is considered to be logged out. You can check for these session values before providing access to a page to the user. Read more about session variables here: www.w3schools.com/php/php_sessions.asp
Nitesh KejriwalPosted May 9, 2014, 12:05 PM
Logout means deleting all non-required data from server's memory regarding a user's state. For ex-, when the user logs in you can store some details about the user in session or you can store the products a user has Added to cart in session. Once the user logs out, you don't want these memory to be blocked in server and you can clear these session variables or you may want to make a call to DB to store the cart.
This is what log oout means. I hope I cleared your doubt.