www.webdeveloper.com
Results 1 to 8 of 8

Thread: Form field values disappearing

  1. #1
    Join Date
    Jan 2004
    Location
    Washington DC
    Posts
    1,107

    Form field values disappearing

    I keep having a recurring problem with HTML forms. I have a form in an HTML page, I have set no headers, meta tags or PHP. I submit the form and if there is an error with the form data, I go an error processing page. When I click the back button in the browser, my form values are empty. Can someone tell me why this is happning and how to fix?

    Thanks
    Bittersweet web development.

  2. #2
    Join Date
    Mar 2004
    Posts
    3,056
    Does it have a file upload field in the form? I've just built a file uploader and noticed it does exactly the same thing. Back button doesn't allow retention of the form data on the file upload form, but it does retain data on forms without the file upload field. It's probably a good thing though if ya think about it.

  3. #3
    Join Date
    Jan 2004
    Location
    Washington DC
    Posts
    1,107
    Nope, unrelated. Here's the URL:

    http://conference.familyservicesagency.org/schedule.php

    Select a couple of checkboxes within a single session and click submit (the submit is at the bottom)
    Bittersweet web development.

  4. #4
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    Does PHP support variables with session scope? If so then you need to save your form data in the session then reload the form widgets from the session data when the form is reloaded. I think it's called something like a Memo or Memento pattern.
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

  5. #5
    Join Date
    Mar 2004
    Posts
    3,056
    I don't see a form on the page you linked to. I can't find any links either that might link to a page with forms. Did you accidentally post the wrong address?

  6. #6
    Join Date
    Jan 2004
    Location
    Washington DC
    Posts
    1,107
    Checkboxes my friend.
    Bittersweet web development.

  7. #7
    Join Date
    Mar 2004
    Posts
    3,056
    Aye. I don't see any form elements. Checkboxes, radio buttons, anything.

  8. #8
    Join Date
    Jan 2004
    Location
    Washington DC
    Posts
    1,107
    http://conference.familyservicesagency.org/schedule.php

    The check boxes are next to the pretty purple SELECT boxes.
    Bittersweet web development.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles