|
| Session Handling
On the Internet, a SESSION refers to the time a user access a website for. A SESSION OBJECT is
something that is stored on the webserver to hold information about the about the user, it could
be the username, his preferences or other information. A SESSION OBJECT is created when the user
access the site and destroyed either when the user abandons the SESSION or timeouts. A user to
website connection is not open continuously. Once a page has been created on the webserver and
sent, the webserver starts a countdown which if it has not heard a page request from that user,
it closes the session. Session are temporary items, if you want information to be held long after
the user has disconnected then you consider Cookies.
| Open a session |
|
session_start(); session_register('Webuser'); |
| |
| Storing an item in the session |
Session("Name") = "Nigel" |
$_SESSION["Webuser"]="Nigel" |
| |
| Abandon Session |
Session.Abandon |
session_destroy(); |
| |
Make a comment*Comments are the views of individuals, they may or may not be correct. All comments are reviewed and accepted or rejected. If you give an email address, you will be sent an email when someone makes a comment on this page.* | Only name and Code is compulsory. |
|