Forum Moderators: coopster
<?
session_start();
if (!isset($_SESSION['track'])) {
$_SESSION['track'] = 0;
} else {
$_SESSION['track']++;
}
?>
Which sets a cookie. I can also check if the cookie exists when the user goes to another page.
How do you store information in the cookie? For example if I want to store a number like 1200, and then get that information from the cookie again when they go to another page?
... With $_SESSION, there is no need to use the session_register(), session_unregister(), session_is_registered() functions. Session variables are accessible like any other variables.
[ca.php.net...]