Re: redirecting to a new page
| From: | David Robley | Date: | Wed, 26 Jul 2000 04:28:32 +0000 |
| Subject: | Re: redirecting to a new page | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8204@lists.php.net to get a copy of this message | ||
On 25 Jul, Generic Player wrote:
> Hello again
>
> I have a page that takes info in from a form, and sends it to a php
> page. That page then checks if the info is valid or not. If its not it
> gives them the error, but if it is, then it adds the data to the
> database, and I would like it to then re-direct them to another page.
> The only things I could find to send people to a new page needed to be
> used in the header, which won't work. Any ideas?
>
> thanks
> Generic Player
You could (without outputting anything) do a validation check and if all
is OK, update the database and then issue the header, having not output
anything.
If the data is incorrect, then you issue your error message and do
wahtever else needs to be done to allow client to resubmit correct data.
Cheers
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA