Session Counter

You have visited this page:

1

time

Visit Again Reset Counter

Session Information

Session ID: 3009cf21a306cc699ddf9f384fe8a6fe
First Visit: 2026-08-12 12:45:21
Session Name: PHPSESSID

Try These Experiments

The Code

<?php
session_start();

// Initialize if not set
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
}

// Increment
$_SESSION['count']++;

echo "Visit count: " . $_SESSION['count'];
?>

Back to Module | Next: Login Flow