Learning Sessions
Sessions are basicly cookies with a fallback, they end when you close you're browser.
Category: Coding
Views: 4730

Learning Sessions Welcome, today we will be learning sessions.
What are sessions?
Sessions are basicly cookies with a fallback, they end when you close you're browser.
You can use sessions to store data.
To use sessions you have to first use this code at the top of you're page:
Code:
session_start();
?>


to set a session you use this code:
Code:
session_start();
$_SESSION['session_name'] = 'session data';
?>


To distroy a session:
Code:

session_start();
unset($_SESSION['session_name']);
?>

If you would like more help with this tutorial please register and visit the forum.

About Michael

Michael Dunlop Michael Dunlop personal statement

“But I am already older than 21”, I hear you cry. Don’t worry, despite the name, the information and advice is more geared towards retiring prior to having a fake hip installed.

Website Sponsors
Recommended Websites
They Buy, Build, Upgrade and Sell Websites.
 
Advertise Here
Feature Interviews
Graham went from $100 one day to ... Read more
Paul Bourque started affiliate marketing less than ... Read more
Interview with Yaro Starak of Entrepreneurs-Journey.com is ... Read more
Recommended Resources
 
 
 
 
 
Get Retire at 21's FREE Secrets
Find out how I'm going to Retire VERY Early Subscribe for my Free Secrets Privacy Guaranteed. 100% Spam free.