RE: [PHP] Header ("location: test.php");
| From: | Hoover, Josh | Date: | Tue, 20 Feb 2001 18:21:49 +0000 |
| Subject: | RE: [PHP] Header ("location: test.php"); | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-40780@lists.php.net to get a copy of this message | ||
The answer is yes, you need to pass along your form variables. You could do
this with the following:
<?php
$formVars = "";
//Use $HTTP_GET_VARS if form is a get type
while(list($name,$value)=each($HTTP_POST_VARS))
{
$formVars .= $name . "=" . $value . "&";
}
if($submit == 2)
Header("Location: test2.php?" . $formVars);
?>
Hope that helps you out some.
Josh Hoover
KnowledgeStorm, Inc.
Searching for a new IT solution for your company? Need to improve your
product marketing?
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here
> if ($submit ==2)
> {
> Header(location: test2.php);
> }
>
> Should not the form varaibles be passed along to each of these pages
> respectively? I have about 30 variables that should be passed to each
> different page...none of these variables are showing up. Do I
> need to attach
> these to the url for each different header?
> such as:
> Header ("Location: test1.php?add=1&name=juan");