RE: [PHP] Form duplicate post problem
| From: | John W. Holmes | Date: | Sun, 29 Dec 2002 19:29:09 +0000 |
| Subject: | RE: [PHP] Form duplicate post problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129602@lists.php.net to get a copy of this message | ||
> >Yeah, you should be using a header() redirect, not a javascript or
META
> >REFRESH redirect...
>
> Well, i tried, but i get an error saying that all the headers
> were
> already sent to the browser. :-P
> I used:
>
> header('Location: http://www.blahblah.com
> etc');
>
>
> I placed this header right after all the database writes.
Well, yeah, the idea is that you don't output anything on the
"middle-man" page, only do your inserts and that's it.
The error message tells you exactly where the output is starting, if
that's a mystery to you (output started in file.php:2 means line 2 of
file.php).
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/