I've read all I can about passing session variables but I cant get it to work. I am using PHPv5.0.3 and am trying to first create a new session ID then pass it to my next page without the use of cookies. My code is as follows:
file1.php:
<?php
ini_set('session.use_cookies', false);
session_start();
session_regenerate_id();
echo "sid = " . session_id();
?>
<form action="./file2.php" method="post">
<input type=hidden name=session value=<?php echo session_id(); ?> >
<input type=submit value='submit'>
</form>
file2.php:
<?php
ini_set('session.use_cookies', false);
session_start();
echo "sid = " . session_id();
echo "<br>prev_sid= ".$_POST['session'];
?>