header("Location:blah...") - passing variables

From: Date: Tue, 04 Dec 2001 17:46:29 +0000
Subject: header("Location:blah...") - passing variables
Groups: php.general 
Request: Send a blank email to php-general+get-76556@lists.php.net to get a copy of this message
Hi, I wonder if someone could tell me whether or not the following is possible? I have an HTML form which passes a username and password to a PHP script for validation. If either is not valid, I would like it to return to the previous page - carrying with it a variable plus the submitted form information... =-=-=-=-=-=-=-=-= if (strlen ($password1) <4 ) { $err = "Password must be more than 4 characters long"; header("Location:http://somelocation.php"); // ^-- at the location, the $err and form variables will be available exit; } =-=-=-=-=-=-=-=-= Is it possible to this without using an HTML form? Thanks very much in advance. - Best regards, Lee

« previous php.general (#76556) next »