note 103130 added to features.sessions
| From: | Danafazeli at hotmail dot co dot uk | Date: | Mon, 28 Mar 2011 04:10:09 +0000 |
| Subject: | note 103130 added to features.sessions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178257@lists.php.net to get a copy of this message | ||
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
?>
----
Server IP: 69.147.83.197
Probable Submitter: 153.107.97.161
----
Manual Page -- http://www.php.net/manual/en/features.sessions.php
Edit -- https://master.php.net/note/edit/103130
Del: integrated -- https://master.php.net/note/delete/103130/integrated
Del: useless -- https://master.php.net/note/delete/103130/useless
Del: bad code -- https://master.php.net/note/delete/103130/bad+code
Del: spam -- https://master.php.net/note/delete/103130/spam
Del: non-english -- https://master.php.net/note/delete/103130/non-english
Del: in docs -- https://master.php.net/note/delete/103130/in+docs
Del: other reasons-- https://master.php.net/note/delete/103130
Reject -- https://master.php.net/note/reject/103130
Search -- https://master.php.net/manage/user-notes.php