Hi,
I'm just a few weeks into learning PHP, and now wants to understand
sessions. But I've run into trouble with the very first script I've tried,
even though it's more or less copied from the PHP manual.
<?php
include ("html_functions.php");
$title = "Anders testing SID";
$header = " ";
html_begin ($title, $header);
if (!session_is_registered('count')) {
session_register('count');
$count = 1;
}
else {
$count++;
}
?>
<?php echo $_COOKIE["PHPSESSID"]?>
<BR>
<BR>
Hello visitor, you have seen this page <?php echo $count; ?> times.<p>
To continue, <A HREF="visasida.php?<?php echo SID?>">click here</A>
<?php
html_end();
?>
The session id isn't attached to the link in the end of the script, and
therefore $count always is '1', even after I click the link.
But the $_COOKIE["PHPSESSID"] does contain a value.
I'm using PHP 4.2.2 and according to phpinfo() session.use_trans_sid is
set to '1'. What I'm missing?
Best regards,
Anders Thoresson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
- Re: [PHP] newbie having problem with SID Anders Thoresson
- Re: [PHP] newbie having problem with SID Ernest E Vogelsinger
- Re: [PHP] newbie having problem with SID Anders Thoresson
- Re: [PHP] newbie having problem with SID Chris Shiflett