Retaining previous posted values
Posted: Sat May 17, 2003 3:12 pm
I have a form that if submitted correctly posts back to itself with a message that says the record was entered correctly.
what I would like to do is retain the last values entered in some of the fields so that they don't have to retype everything if they want to add addtional records (it's a list of species and many times phylum, class, order do not change.)
i thought I could do it with session variables but it doesn't work.
Basically here is an example
Then I put the session variable in the field like this
But all the previously posted values are cleared when it reposts to itself.
What am I doing wrong.
Thanks
what I would like to do is retain the last values entered in some of the fields so that they don't have to retype everything if they want to add addtional records (it's a list of species and many times phylum, class, order do not change.)
i thought I could do it with session variables but it doesn't work.
Basically here is an example
Code: Select all
$_SESSION['phylum']=$_POST['phylum'];Then I put the session variable in the field like this
Code: Select all
<?php echo $HTTP_SESSION_VARS['phylum']; ?>But all the previously posted values are cleared when it reposts to itself.
What am I doing wrong.
Thanks