I am trying to figure out how I can do a PHP if (option 1 isset) { go here }.
Basically, I have a squeeze page that is capturing whether male/female, age, weight, and height. To start... I figure I should probably send the males to different landers than females (and eventually send young vs. old males/females to different spots too).
Here's the form on my squeeze page:
My results.php file has a function that does a calculation and echoes it back to the user. How do I use PHP to tell which option has been selected?
Also, I'm thinking Im gonna need to use an intermediary script (i.e. action url)to tell whether male/female (so I can forward them to different landers)... and at the same time, pass the variables they entered to the final lander.
If anyone can help me on this one, I'll hook you up for sure.
Basically, I have a squeeze page that is capturing whether male/female, age, weight, and height. To start... I figure I should probably send the males to different landers than females (and eventually send young vs. old males/females to different spots too).
Here's the form on my squeeze page:
Code:
<form action="results.php" method="get">
<fieldset>
<legend>Step #1:</legend>
<table>
<tr>
<td><span>Sex</span></td>
<td>
<select name="sex">
<option value="1">SELECT</option>
<option value="2">Male</option>
<option value="3">Female</option>
</select>
</td>
</tr>
<tr>
<td><span>Weight (lbs)</span></td>
<td><input type="text" name="weight" value="" style="background:#eee; padding:3px; border:1px solid silver; font-size: 17px; margin-top:8px;font-weight:bold;" /></td>
</tr>
<tr>
<td><span>Height (inches) <a class="popup" href="javascript:popup()">?</a> </span></td>
<td><input type="text" name="height" value="" style="background:#eee; padding:3px; border:1px solid silver; font-size: 17px;font-weight:bold;" /></td>
</tr>
<tr>
<td><span>Age (years)</span></td>
<td><input type="text" name="age" value="" style="background:#eee; padding:3px; border:1px solid silver; font-size: 17px;font-weight:bold;"/></td>
</tr>
<tr>
<td colspan="2" align="right"><input type="submit" value="What's my resting metabolic rate?" style="margin-top:4px;margin-bottom: 10px;position:relative;right:40px;" /></td>
</tr>
</table>
</fieldset>
</form>
My results.php file has a function that does a calculation and echoes it back to the user. How do I use PHP to tell which option has been selected?
Code:
if( isset($_GET['???'])
Also, I'm thinking Im gonna need to use an intermediary script (i.e. action url)to tell whether male/female (so I can forward them to different landers)... and at the same time, pass the variables they entered to the final lander.
If anyone can help me on this one, I'll hook you up for sure.