Session Registering
| From: | Craig Donnelly | Date: | Thu, 25 Apr 2002 15:52:42 +0000 |
| Subject: | Session Registering | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-94572@lists.php.net to get a copy of this message | ||
Im using session in my form, there are 6 pages to the form, It all works
fine, until You work your way back through the form, to ammend the filled in
details.
e.g - If I go to page 1, and fill out my name, and post to the next page,
heres the code Im using:
PHP:------------------------------------------------------------------------
--------
<form method="post" action="page2.php">
<input type="text" name="firstname"
value="<?=$_SESSION['firstname'];?>">
</form>
----------------------------------------------------------------------------
----
Its registered on the top of page2 with the following code:
PHP:------------------------------------------------------------------------
--------
session_start();
$_SESSION['firstname']=$_POST['firstname'];
----------------------------------------------------------------------------
----
That works fine, I have a link on all my pages that links back to the
previous page e.g <a href="page1.php">Go Back</a>
If I go back to the first page, from the second page the fields are
populated fine, but If i continue onto page3.php then go back page1.php is
no longer populated!!
Any Ideas why this is happening?? and If so a remedy, Is it a code issue or
a conf Issue??
Thanks
C