Posting Values to Page Quetion
Posted: Wed Apr 28, 2010 2:18 pm
In a nutshell I get some data from a user:
PAGE1
Then I grab the data
PAGE2
Then I redirect the user based on the value:
Still PAGE2
This isn't to redirect users if the name field is blank but for simplicities sake I've posted a very brief version here. The question is how do I grab the data from page 1 and place it on page 3 with the redirect that I have set-up on page 2?
PAGE1
Code: Select all
<form name="form" method="post" action="proces-this.php">
<table>
<tr>
<td>Name:</td>
<td><input name="name" type="text" id="name" /></td>
</tr>
</table>
</form>
PAGE2
Code: Select all
$name = trim($_POST["name"]);
Still PAGE2
Code: Select all
if ($name=="")
<!--ADD SOME CODE HERE THAT WILL ALLOW ME TO TAKE THE $name VALUE TO EITHER URL BELOW-->
{
echo '<META HTTP-EQUIV="Refresh" Content="1; URL=success.php" >';
}
else
{
echo '<META HTTP-EQUIV="Refresh" Content="1; URL=no-go.php">';
}