downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Dealing with XForms> <Cookies
[edit] Last updated: Fri, 11 Nov 2011

view this page in

Sessions

Session support in PHP consists of a way to preserve certain data across subsequent accesses. This enables you to build more customized applications and increase the appeal of your web site. All information is in the Session reference section.



add a note add a note User Contributed Notes Sessions
Danafazeli at hotmail dot co dot uk 28-Mar-2011 02:40
To start and record a session do:
<?php
session_start
(); //starts the session

if(isset($_SESSION['views']))
$_SESSION['views'] = $_SESSION['views']+1;//if the session is started and the page is visited, add a count
else
$_SESSION['views'] = 1;//else keep it as it is
echo "Views=". $_SESSION['views'];//show the amount of page hits
?>

 
show source | credits | sitemap | contact | advertising | mirror sites