Forum Moderators: coopster
echo "session_id = ". session_id().'<br>';
I can read the session_id on the page on which it was created (my form).
What do I have to do to read it on another page (my form handler)? I've also tried
echo "session_id = ". $_SESSION['session_id'].'<br>';
but still no luck.
Thanks for any help.
[url=http://us3.php.net/manual/en/function.session-start.php]session_start[/url]();
echo 'session_id = '.session_id().'<br>';
<input type="hidden" name="sid" value="<?php echo session_id();?>">
Accessed via $_POST['sid'];
or append it to the form action for a get request:
<form method="post" action="index.php?sid=<?php echo session_id();?>">
Accessed via $_GET['sid'];
dc
One additional note is that you can enable use_trans_id [us3.php.net] and relative URIs will be changed to contain the session id automatically.
Good luck ;)