All pastes #568487 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-15 15:48 UTC
rendered paste body
<?php
error_reporting(E_ALL);
session_start();
//check if the counter is set and if not, initialize it
if(!isset($_SESSION['counter'])) {
    $_SESSION['counter'] = 0;
}
//increment the session counter
$_SESSION['counter']++;
//display it
echo 'Session counter is '.$_SESSION['counter'];
?>