Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: Form Help

  1. #1
    Regular Coder
    Join Date
    May 2002
    Location
    London, England
    Posts
    367
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form Help

    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!!

    Thanks

    Jee
    Jeewhizz - MySQL Moderator
    http://www.sitehq.co.uk
    PHP and MySQL Hosting

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Montreal, Canada
    Posts
    644
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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:

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


  • #3
    Regular Coder
    Join Date
    May 2002
    Location
    London, England
    Posts
    367
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I can't use that as its a series of radio buttons, select menus, checkboxes etc etc

    I'm using the back button!
    Jeewhizz - MySQL Moderator
    http://www.sitehq.co.uk
    PHP and MySQL Hosting

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Montreal, Canada
    Posts
    644
    Thanks
    0
    Thanked 0 Times in 0 Posts
    weird, with the back button, it should stay. Ican't think of anything else. But whats the problem with using cookies or session variables?

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    are you doing anything with scripting on that page which resets the fields to theior default? that would do it.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    1,137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    does the forms method e.g. post or get have any affect on it?

    scroots
    Spammers next time you spam me consider the implications:
    (1) that you will be persuaded by me(in a legitimate mannor)
    (2)It is worthless to you, when i have finished


  •  

    Posting Permissions

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