Here is what I'm trying to do:
index.php
num1
num2
num3
num4
num5
// print 5 more nums when link below is clicked...
if($_GET['genTexts'] == 1) {
include ('generateFields.php');
}
// link should call generateFields (below). The first time the link is clicked should bring up num6-num10. The second time should bring up num11-num15. I can't seem to work that out in generateFields.php either.
<a href="index.php?genTexts=1&what=Tracking&whatdb=track" title="Enter More Numbers">Enter More Numbers >></a>
<?php
if($i <= 10) {
for ($i=6; $i <= 10; $i++) {
$whatPlus = $GET['what'].$i;
$whatPlusdb = $GET['whatdb'].$i;
$newFields[$i] = "<tr><td>$whatPlus:</td><td><input type='text' size='25' name='$whatPlusdb' /></td></tr>";
echo $newFields[$i];
}
} else if($i >= 11) {
for ($i=11; $i <= 15; $i++) {
$whatPlus = $GET['what'].$i;
$whatPlusdb = $GET['whatdb'].$i;
$newFields[$i] = "<tr><td>$whatPlus:</td><td><input type='text' size='25' name='$whatPlusdb' /></td></tr>";
echo $newFields[$i];
}
}
?>
Any help on this is greatly appreciated. Objective: The page shows five text fields. When the user has more than 5 numbers they should be able to click on the link to get another 5. Then, once more, another 5 for a total of 15 text fields.
Matt