Hi
I confess I'm the newbiest of newbies to PHP. I have been working on passing one session variable (plus another variable)from a test page to another test page for, well, the last week! I've got to the point now where I cannot see what I'm doing wrong so I would really appreciate some advice.
The session_id value echoes OK but on the second page, no value is returned for the session variable ($new_mine) and an error message says the other passed variable ($mine) is undefined.
FIRST PAGE CODE:
<?php
session_start(); //doesn't make any difference whether or not I include this
session_register('new_mine');
?>
<html>
<body>
<?php
$mine=$new_mine
?>
The session_id is: <?php echo (session_id());
?>
<form action="p2.php" method=post>
<p>what the hell are you doing? <input name=new_mine type=text></p>
<input type=submit name=submit value="Submit">
</form>
</body>
</html>
SECOND PAGE CODE:
<?php
session_start();
?>
<html>
<body>
the recalled session variable:<br>
<?php
echo $new_mine
?>
the passed variable:<br>
<?php
echo $mine
?>
</body>
</html>
Thank you for any help!
Regards
David