Counter.php

From 2010.igem.org

(Difference between revisions)
Shaothing (Talk | contribs)
(New page: <?PHP session_start(); if(isset($_SESSION['views'])){ $_SESSION['views'] = $_SESSION['views']+ 1; }else{ $_SESSION['views'] = 1; } echo "Total page views = ". $_SESSI...)
Newer edit →

Revision as of 12:57, 21 July 2010

<?PHP

 session_start();

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

?>