Getting output from <input> and using it to display prime...
Posted: Thu Jan 22, 2009 12:21 am
Here is the code
I am not sure how bad that code is above, could someone take a look and give me some pointers, to resources, etc. that might help me to solve this problem. I am trying to get input from the user from the two input boxes, and display all the numbers between those two numbers in a text area, ultimately I will only print out the prime numbers. I just need help on syntax.
Thank you,
Matthew Hoggan
Code: Select all
<form action="/FreewayApp/index.php" method="post">
<label>Start Number</label>
<input name="start" type="text" id="start" maxlength="10"></input>
<label>End Number</label>
<input name="stop" type="text" id="stop" maxlength="10"></input><br><br><br>
<label>Prime Integers</label><br>
<textarea name="output" id="outputA" rows="20" cols="50" maxlength="200" wrap="soft">
<?php
for($x = _GET['start']; $x < _GET['stop']; $x++)
{
echo $x.', ';
}
?>
</textarea><br>
<input type="submit" value="Find Primes" id="button"></input>
</form>
Thank you,
Matthew Hoggan