The FORM portion is entered as TEXT, and the "NAME" is actually a variable called data that the second program will use to learn what value was entered by the user.
<HTML>
<BODY BGCOLOR = "#FFFFFF">
<CENTER>
<H1> Iteration Program </H1>
</CENTER>
Today's Date:
<?
print(date("l F d, Y"));
?>
<H3> Enter a Value to Iterate </H3>
<FORM ACTION = "results.php3" METHOD = POST>
<INPUT TYPE="text" NAME = "data">
<P>
<INPUT TYPE="submit" VALUE = "Show Results">
</BODY>
</HTML>
<HTML>
<BODY BGCOLOR = "#FFFFFF">
<CENTER>
<H1> Iteration Results </H1>
</CENTER>
<B>Here are 10 iterations of the formula: <BR>
y = x <SUP> 2 </SUP>
</B>
<P>
<!-- PHP Calculations start here! -->
<?
$num = $data;
print("Original value of x: <B>$data </B> <P>");
for($i = 1; $i <= 10; $i++)
{
$num = $num * $num;
print("$i. $num <BR>");
}
?>
</BODY>
</HTML>
This program should request information such as the initial value of x as well as the rate constant, k, and possibly the number of iterations desired. A display will be generated that shows what happens as the equation, y = k*x*(1-x) is iterated, where 0 < x < 1 and 1 <= k <= 4.
Investigate different values of k to see if you can determine the exact point when the first Bifurcation happens. Can you find the second?