Re: session
| From: | Norbert Wenzel | Date: | Tue, 20 Sep 2005 13:44:34 +0000 |
| Subject: | Re: session | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-222764@lists.php.net to get a copy of this message | ||
Roman Duriancik wrote:
<?
session_start();
session_register('pocet');
$count++;
echo $count;
session_destroy();
?>
<a href="test.php?<?php echo(SID)?>">link</a>
and when i click on link always I have in $count value 1 but I need
value 2,3,....
how to do it ?
i think this is what you asked for:
if(isset($_SESSION['count'])) {
$_SESSION['count']++;
}
else {
$_SESSION['count'] = 1;
}