A session is a way to store information in the form of variables to be used across multiple pages. Unlike a cookie, specific variable information is not stored on the users computer.

It is also unlike other variables in the sense that we are not passing them individually to each new page, but instead retrieving them from the session we open at beginning of each page.

Session is usually used to retrieve data belong to specific person stored in the server. You can use single session to retrieve personal information, but using multiple sessions are the safest.

Syntax: $_SESSION['name'] = value;

You must first start up the session before you can store user information in your session using  the  session_start() function.

The session_start() function must appear BEFORE the <html> tag:


session_start();//start the session

$_SESSION['name'] = 'Bryan'; //set the session name with value Bryan
<?php echo $_SESSION['name']; ?>


Destroying the session

session_destroy() destroys all of the data associated with the current session, however it does not unset any of the global variables associated with the session, nor does it unset the session cookie. It is often used with session_unset() to more thoroughly remove the session.



$_SESSION["name"]="Bryan"; //set the session name with value Bryan

session_destroy();//destroy all sessions

How to take Cialis it seems to me that would already be time to cease to discuss this question. As I already answered it not once. Have it in a look. You shouldn’t worry! All deer go south when they are called by homesickness. Are turned and lie on snow till some hours.