NYCPHP Meetup

NYPHP.org

[nycphp-talk] Need page refresh solution after form data processing

Daniel Kushner nyphp at websapp.com
Fri Dec 19 13:28:53 EST 2003


Scott,

After processing the form, you can redirect (header('Location: page.php');
exit;) to another page that has some 'Form has been processed' message. If
the user hits refresh, he/she won't be resubmitting the form.

Best,
Daniel Kushner

> -----Original Message-----
> From: talk-bounces at lists.nyphp.org
> [mailto:talk-bounces at lists.nyphp.org]On Behalf Of
> tech at protchkocreative.com
> Sent: Friday, December 19, 2003 1:23 PM
> To: NYPHP Talk mailing list
> Subject: [nycphp-talk] Need page refresh solution after form data
> processing
>
>
>
> I am trying unsuccessfully to eliminate the browser warning that
> it "can't
> refresh the page without re-submitting the form data" when
> refreshing my form
> page after it is submitted. Though refreshing the page wouldn't
> be typical, I
> want to eliminate any potential user confusion.
> Browser: IE6
>
> The form is processed as:
> <FORM NAME="request" action="<?php echo $_SERVER['PHP_SELF']; ?>"
> METHOD="POST">
>
> which then takes some action in the form:
>
> if($beenSubmitted) {
>          //concatenate results
>            ...
>          //mail results
>           }
>
> AND serves the form again!
>
> I have some sense it has to do with caching of header info. I have
> unsuccessfully tried various header("xyz'); statements after
> processing the
> form and before serving the HTML, including many suggested in the
> documentation. I have googled. Again, haven't found suggestion
> that works, or
> that I'm implementing correctly. I am not very knowledgable in
> the smoke 'n
> mirrors of HTTP headers.
>
> I appreciate any thoughts on this.
> Scott Protchko
> tech at protchkocreative.com
>
>
>
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
>





More information about the talk mailing list