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> <Ciasteczka (cookies)
[edit] Last updated: Fri, 23 Mar 2012

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
idandaniels at gmail dot com 05-Mar-2012 09:00
How to start a session and track it by Pageviews, in this example, if there arent any pageviews, we will get 1.

<?php
session_start
();

if(isset(
$_SESSION['views']))
{
$_SESSION['views']=$_SESSION['views']+1;
}
else
{
$_SESSION['views']=1;
echo
"Views=". $_SESSION['views'];
}
?>

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