Showing posts with label session. Show all posts
Showing posts with label session. Show all posts

Sunday, 18 May 2014

How to use PHP Sessions


Session variable is used to store information.Session variables hold information about one single user, and are available to all pages in one application.



Sessions work by creating a unique id (UID) for each visitor and store variables based on this UID.


Starting a PHP Session

Before using PHP session variable, you must first start the session.
Note: The session_start() function must appear BEFORE the <html> tag:

<?php session_start(); ?>