Trouble with sessions 2
Posted: Fri Jul 26, 2002 3:51 pm
I want to post a variable to a page and for that page to make it a session variable like so-
<?php
session_start();
$_SESSION['per']=$_POST['per'];
echo $_SESSION['per'];
?>
(The variable per is posted from another page.)
this echo's the variable 'per' but not when the page is returned to, so the post is successful but the variable will not persist??
Anyone help on this??
thanks
Gav
<?php
session_start();
$_SESSION['per']=$_POST['per'];
echo $_SESSION['per'];
?>
(The variable per is posted from another page.)
this echo's the variable 'per' but not when the page is returned to, so the post is successful but the variable will not persist??
Anyone help on this??
thanks
Gav