Thank you for the response. I tried a few variations and it didn't work. This is what I have:
Page 1
Someone submits their info
Code: Select all
<form method="process-this.php" action="post">
<tr><td>Name:</td></tr><input type="text" name="name" />
<tr><td>Email:</td></tr><input type="text" name="email" />
<tr><td>Phone Number (Optional):</td></tr><input type="text" name="phone" />
<input type="submit" value="Go" name="btn" />
</form>
Page 2
The information goes to one of two pages depending on whether or not the 'phone' field is blank. Regardless, the 'name' and 'email' fields must be forwarded to PAGE 3
Code: Select all
<?php
if ($phone=="")
if (isset($_POST['btn'])) {
if (isset($_POST['name'])) {
$val = clean_up_value($_POST['name']);
header("location: Page_3.php?id=$val");
}
else {
echo '<META HTTP-EQUIV="Refresh" Content="1; URL=page-with-phone-number.php">';
}
}?>
That being said, to grab and forward more fields from PAGE 1 would I do something like this, correct?
Code: Select all
<?php
if (isset($_POST['name'])) {
$val = clean_up_value($_POST['name']);
if (isset($_POST['email'])) {
$val2 = clean_up_value($_POST['email]);
if (isset($_POST['phone'])) {
$val3 = clean_up_value($_POST['phone]);
}?>
And then add it like this to my redirect? Am I on the right track?
Code: Select all
header("location: Page_3.php?id=$val$val2$val3");
I'll put it in a logical way:
> Person submits Name, Email & Phone Number information.
> Where the person submits only their name and email both the name and email get forwarded to page 'X' with the user being redirected to that page respectively.
> Where the person submits all three fields they we'll get forwarded to page 'Y' with the user being redirected to that page respectively.