Re: Reload page after form submit
| From: | Per Jessen | Date: | Thu, 30 Aug 2007 16:15:35 +0000 |
| Subject: | Re: Reload page after form submit | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-261537@lists.php.net to get a copy of this message | ||
Wagner Garcia Campagner wrote:
> Hello,
>
> I'm building a web page just like a blog...
>
> Where the user input some information... (name, website and comment)
>
> This information is stored in a file...
>
> And then the page displays it...
>
> When the user access the page the first time, the information is
> displayed correct...
>
> After the user submit the information, the page become outdated...
> without this last information the user submitted...
>
> Is there a way to tell PHP to reload the page after the user submit
> the information, so the page is always updated??
After you've processed the POST request, you finish with something like
this:
header("HTTP/1.0 303 See other");
header("Location: #");
exit;
/Per Jessen, Zürich