Need help making my PHP counter - very basic?

brandon

New member
I got Aptana Studio because it said it had a built in server. I typed up this code from one of my books, but can't seem to get it to work. It just shows my PHP code in the browser.

<?php
session_name("counter");
session_start();
header("Cache-control:private");

$_SESSION['counter']++;

echo "You have visited this page {$_SESSION['counter']} times.";
?>

Thanks!!!
 
Back
Top