Wednesday, April 7, 2010

Sessions

$_SESSION variable is used to store any informations, or change settings for a user session. It holds information for one single user and also available to all of your pages in one application.



Start a Session


(click image to view)



Storing a Session Variable


(click image to view)

############################################################
The Output: Hit Counter=1
############################################################



Destroy a Session


(click image to view)

or you can use session_destroy() to reset session ready to lose all your stored session data:


(click image to view)

No comments:

Post a Comment