rendered paste body<?
unset($_SESSION['count']);
echo $_SESSION['count'];
#if (isset($_COOKIE[$_SESSION('count')])) {
setcookie($_SESSION('count'), '', time()-60);
#}
session_destroy();
?>
<a href="http://localhost/registre/index.php">registre</a>
Contador.php
<?php
session_start();
// Use $HTTP_SESSION_VARS with PHP 4.0.6 or less
if (!isset($_SESSION['count'])) {
$_SESSION['count'] = 0;
echo 'Visites ='.$_SESSION['count'];
} else {
$_SESSION['count']++;
echo 'Visites inicialitzades = '.$_SESSION['count'];
}
?>
index.php
<html>
<head>
</head>
<body>
<a href="http://localhost/registre/contador.php">contador</a>
<a href="http://localhost/registre/surt.php">surt</a>
Pàgina inicial de registre, surt ?
<a href="http://localhost">Inici</a>
</body>
</html>