I want to create a counter using a session, what I am doing is
<?
if (!isset($session)) {
srand((double)microtime()*1000000);
$randval = rand();
setcookie("session",$randval);
$sql = "insert $session into DB";
}
?>
The problem is that when the user enters my page it has to hit reaload or go to a next page to activate the session.
Do you know guys a better solution?
Thanks