I am trying to pass an email variable from a signup form to a second page, before finally posting the output to an order form. The first form will look like this: <head> <title>Form</title> </head> <body> <form action="signup2.php" method="post" target="_self"> email: <input name="email" id="email" type="text"><br /> <input type="submit"> </form> </body> </html> PHP: There is a second form submission on "signup2.php" that points to a particular header redirect. I don't understand how to get the email variable passed from a text box on the email form to "signup2.php" and ultimately into the header redirect as shown in the code below. Here is the raw PHP code of "signup2.php" <?php $paytype=${"button"}; $payselect=${"payselect"}; // --------------------------------------------- if ($paytype=="Pay Now") { switch ($payselect) { case "lifetime": $payVal = 1; break; case "2yr": $payVal = 4; break; case "1yr": $payVal = 9; break; default: $payVal = 13; break; } if ($_POST['OPTIN'] == "ON") { if ($_POST['OPTIN1'] == "ON") } else { $payVal = $payVal + 1; } } else } if ($_POST['OPTIN1'] == "ON") { $payVal = $payVal + 2; } else { $payVal = $payVal + 3; } header("Location: http://$payVal.publisher.pay.clickbank.net/?email=" . $_POST["email"]); } ?> <form name="paymethod" action="<? echo $_SERVER["PHP_SELF"];?>" method="post"></strong> PHP: Thanks for any help.
well you get the submitted variables through the $_POST or $_GET variables in your case $_POST['email] <--- will contain the submitted value of the email field
So I would replace method="post" with this? <form action="signup2.php" method="<?php $_POST['email'] ?> <target="_self"> PHP:
you dont have to put parameters on your header... your form in first page "action" is already redirecting you to your signup2.php means, all the variables will push through your second page.. try to clear all parameters first,, maybe it confuses you.. catch the values of the variables by $_POST (what SerialCoder means)