Session Variables

From Hostek.com Wiki
Revision as of 04:03, 16 July 2013 by Briana (Talk | contribs) (Created page with "__FORCETOC__ ==ASP Session Variables== ==ColdFusion Session Variables== ==PHP Session Variables== Here is an example of testing Session Variables in PHP to verify they are ...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


ASP Session Variables

ColdFusion Session Variables

PHP Session Variables

Here is an example of testing Session Variables in PHP to verify they are working:

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

Click <a href="sessiontest.php">here</a> to refresh which should increment the number of Views.