PHP Classes

Reposting

Recommend this page to a friend!

      PHP Forms Class with HTML Generator and JavaScript Validation  >  PHP Forms Class with HTML Generator and JavaScript Validation package blog  >  How to Show Google Ma...  >  All threads  >  Reposting  >  (Un) Subscribe thread alerts  
Subject:Reposting
Summary:How to prevent reposting data.
Messages:2
Author:Jaromir Kos
Date:2007-06-26 11:07:02
Update:2007-06-26 16:58:31
 

  1. Reposting   Reply   Report abuse  
Picture of Jaromir Kos Jaromir Kos - 2007-06-26 11:07:02
Hi,

this is great class, and I'd like to thank author for it.

There is one thing that I don't understand. In the documentation (Property ACTION) can be found suggestion to process form with the same script as it is defined. It is really convenient, but when user click Reload page button, browser will ask to resend data. Then when OK is clicked, all is reposted again.

That's the reason why write separate script for processing data (inserting to database, or something like that). In the end of processing script is usually command header("Location: http://servername.xxx/script.php?parameters");, which redirects to original page with form or to another.

Is there any different way to prevent browser ask for reposting data?


  2. Re: Reposting   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-06-26 16:58:31 - In reply to message 1 from Jaromir Kos
The way I see it, there is nothing that prevents you to process the request with the same script and in the end redirect to itself, as the redirection is just a GET request without any URL parameters that may make the script assume that the form is being submitted..