Re: session

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux