<i>Please enter the first day of your last menstral cycle</i><br>Please note that this code has been shortened but the full script code can be downloaded if needed.
<form action = "<?php echo $_SERVER['PHP_SELF']; ?>" method = "GET">
<select name="month">
<option value="1">January</option>
<option value="2">February</option>
//shortened...
<option value="11">November</option>
<option value="12">December</option>
</select>
<select name="day">
<option value="1">1</option>
<option value="2">2</option>
//shortened...
<option value="30">30</option>
<option value="31">31</option>
</select>
<select name="year">
<option value="00">2000</option>
<option value="01">2001</option>
//shortened...
<option value="14">2014</option>
<option value="15">2015</option>
</select>
<br/>
<input type = "hidden" name = "go" value="1" />
<input type = "submit" name = "Calculate"/>
</form>
This HTML is a form that submits back to itself using $_SERVER['PHP_SELF']. It allows the expectant parents to enter in the date of the last menstrual cycle. We would place this code below the PHP code we learned on the previous page. The date entered here is then used in our PHP calculation. We also pass one hidden value in this form, for the variable 'go', so that our script will know to execute.

