Validation: Problems with header(Location) in PHP
| From: | Martin Raychev | Date: | Wed, 24 Sep 2003 20:22:40 +0000 |
| Subject: | Validation: Problems with header(Location) in PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-163636@lists.php.net to get a copy of this message | ||
Hi!
I am kind of newbie coming from ASP and I came upon some hindrances, which
could be because of not knowing enough of PHP
The problem is:
I am trying to make a form with good and user-friendly validation. After
failure to validate properly some of the fields and going to another page
i.e. the <form action="anotherpage.php"> I need to go back to the previos
page where the form is.
In ASP I would use Response.Redirect and that's it but the
header (Location...) in PHP is said that it must be on top of the HTML page
before anything else. This doesn't seems to work for me.
Does anyone has a solution to this problem?
Many thanks in advance!
Martin.