View Full Version : Form Help

03-19-2003, 07:47 PM
Why is it on some forms, if you click submit, and then press back it'll have all the details in the boxes, but this one form i'm doing for a client just deletes everything? It will have to have it back in there, because it is aobut 50 fields !!! (don't ask!)

Anything i can use apart from cookies or sessions? I've got a complete mind blank!!



03-19-2003, 08:32 PM
First off, are you pressing the back button on your browser and still losing the data, or are you pressing a link that goes to it, because the link isn't suppossed to retain the data. If you don't want to use cookies or sessions, you can always recreate the form elements on the submit page with:

foreach ($HTTP_GET_VARS as $key=>$val) {
print "<input type='text' name='$key' value='$val'>";

03-19-2003, 08:45 PM
I can't use that as its a series of radio buttons, select menus, checkboxes etc etc :)

I'm using the back button!

03-19-2003, 09:00 PM
weird, with the back button, it should stay. Ican't think of anything else. But whats the problem with using cookies or session variables?

03-19-2003, 11:45 PM
are you doing anything with scripting on that page which resets the fields to theior default? that would do it.

04-16-2003, 08:59 PM
does the forms method e.g. post or get have any affect on it?