Redirect then error message to user

From: Date: Fri, 22 Oct 2004 17:25:06 +0000
Subject: Redirect then error message to user
Groups: php.general 
Request: Send a blank email to php-general+get-200105@lists.php.net to get a copy of this message
I'm not quite sure how to get an error message to print out after a redirect. I know it's possible. Now page1 moves to page2, check below is on page2 If I leave it on page2 (without redirect), it prints error to user fine. Once it redirects no print. I also tried leaving it on form1, at the top it won't work, since the variables haven't been set yet. Not sure how to let it post form 1 to form 1 check and then on success move to form 2. { // valid - next - } else { header("Location: http://www.xxxxxx.com/page1.php" ); print "You have errors"; exit; } } ?>

« previous php.general (#200105) next »