Re: Redirection in PHP ? (newbie)
| From: | Ethan Schroeder | Date: | Tue, 15 May 2001 00:42:02 +0000 |
| Subject: | Re: Redirection in PHP ? (newbie) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-52774@lists.php.net to get a copy of this message | ||
header("Location: page.phtml");
http://www.php.net/manual/en/function.header.php
Ethan Schroeder
----- Original Message -----
From: "Nicolas Mermet" <himself@nicolas-mermet.com>
To: <php-general@lists.php.net>
Sent: Monday, May 14, 2001 6:57 PM
Subject: [PHP] Redirection in PHP ? (newbie)
> Hi, this might be a trivial question but I could not find any docs on that
> on php.net.
>
> I am develloping the admin side of a dynamic web site (php/mysql).
> The mechanic is nothing special: a form is submitted and sends the data to
> the php page/script that actually does the work of feeding the db. I
> noticed that hitting "back" on the browser make the feeding scripts run
> again, and double the entries in the db. Of course, that is what the
> scripts are supposed to do :-).
>
> To avoid spamming my db I would like to implement a simple redirection
> function, that would redirect the user to the main admin page once the
> feeding script has successfully executed and would reduce chances of
> double entries. Is there a simple way to achieve that ?
>
> thanks,
> Nicolas.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>