Re: header("Location:blah...") - passing variables
| From: | Julio Nobrega Trabalhando | Date: | Tue, 04 Dec 2001 17:49:48 +0000 |
| Subject: | Re: header("Location:blah...") - passing variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76557@lists.php.net to get a copy of this message | ||
You should really try to do it and see if it's possible, before asking on
the mailing list... mainly because you will be satisfied with the results...
--
Julio Nobrega
Don't eat the yellow snow.
"Lee Philip Reilly" <lreilly@lanl.gov> wrote in message
news:3C0D0BF5.BF343F0E@lanl.gov...
> 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
>