SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: How do I prevent POST-ed forms from displaying 'reload' message?

Hybrid View

  1. #1
    SitePoint Guru worchyld's Avatar
    Join Date
    Jul 2003
    Location
    Newcastle upon Tyne
    Posts
    909
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I prevent POST-ed forms from displaying 'reload' message?

    When I code Forms, and use the POST command, I make it send to a different page, but when I press back it keeps popping up with the message about having to reload the page or the results or something.

    How do I stop this message from appearing? It really annoys me, and I want the forms to work seamlessly without using GET.

    Please help.

    Many thanks.

  2. #2
    SitePoint Addict Fire59's Avatar
    Join Date
    Aug 2003
    Location
    mn
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    send it to a processing page then redirect it to the next page. For example your form is on page1.php. Have it submit to process.php where you process all the input. Then redirect it to the next page(page2.php). So if they click back from page2.php it would go to page1.php without complaining.

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2004
    Location
    UK
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With forms that I know I do not want re-posting, I have the form page, a processing page which inputs the data to a database or whatever, and which then uses a header redirect to a third output page. If you then press back on the third page, you will be returned to the first page, as the 'processing page' is never really seen by the browser.

    Does that sound like the sort of thing you're after? If you want more detail then let me know.

    Rob.

    Edit:

    Looks like i was beaten to it by Fire59

  4. #4
    SitePoint Guru worchyld's Avatar
    Join Date
    Jul 2003
    Location
    Newcastle upon Tyne
    Posts
    909
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm, let me see if I have this right:

    page1.php -> User fills in data, presses submit on a form
    processing.php -> Does all the processing, perhaps DB stuff too.
    page2.php -> Display the results, if required.

    Wouldn't pressing back on the browser just make it go back to processing.php and therefore re-do all the processing, and perhaps even redo the DB stuff too?

    I also have a feeling that it would also say that message about the reloading of data.

    From my searching, it has something to do with caching, but I am not sure.

  5. #5
    SitePoint Enthusiast
    Join Date
    Feb 2004
    Location
    UK
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In my experience the processing page never really gets 'seen' by the browser, so it doesn't appear in the history and you can't navigate to it using the back/forward buttons, so you should get rid of that problem.

  6. #6
    SitePoint Guru worchyld's Avatar
    Join Date
    Jul 2003
    Location
    Newcastle upon Tyne
    Posts
    909
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, I will try this idea.

    Thank you for your time.

Bookmarks

Posting Permissions

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