Counter.php

From 2010.igem.org

Revision as of 12:57, 21 July 2010 by Shaothing (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<?PHP

 session_start();

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

?>