RE: [PHP] Validation: Problems with header(Location) in PHP

From: Date: Tue, 23 Sep 2003 21:13:40 +0000
Subject: RE: [PHP] Validation: Problems with header(Location) in PHP
Groups: php.general 
Request: Send a blank email to php-general+get-163639@lists.php.net to get a copy of this message
Hi Martin, When they say at the top of the page before anything else, they mean before any other output. Just make sure that you don't have any HTML/text before the header("Location: ...") that's outside of your <?php ?>'s, and that you don't echo anything before your header call. -Javier -----Original Message----- From: Martin Raychev [mailto:marty@developer.bg] Sent: Wednesday, September 24, 2003 1:23 PM To: php-general@lists.php.net Subject: [PHP] Validation: Problems with header(Location) in PHP 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. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#163639) next »