Posted by Norbert Wenzel on 09/20/05 16:44
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;
}
Navigation:
[Reply to this message]
|