Requirements:
User selects various drop down selects, on the search page in the form, to search the db for rows they wish to see. On submit, the submission form reappears at the top and just below it the resulting rows of data appear. The data is summary only. When the user clicks on the href link at the end of each row, the detail page is displayed. I'm able to limit the number of rows on the summary page but am unable to display more than the three initial rows (i.e., using the $limiter=3). Pressing the "Next Page" link redisplays the form submission page without any more subsequent summary data rows below it.
The search webpage has a form submission structure on it that contains various option select tags:
<form action="<?=$PHP_SELF?>" method=post>
<select name="fieldvar">
<option name ="fieldvar">Select All</option>
<option name ="fieldvar">Selection1</option>
<option name ="fieldvar">Selection2</option>
</select>
....
<select name="fieldvar2">
<option name ="fieldvar2">Select All</option>
<option name ="fieldvar2">Selection1</option>
<option name ="fieldvar2">Selection2</option>
</select>
....
<input type="submit" name="submitsearch" value="Submit">
</form>
<?php
include("settings.inc");
mysql_select_db("$mydb", $connection);
if ($submitsearch == "Submit") {
$result = @("Select ID, ... fieldnames...");
}
while ($row = mysql_fetch_array($result)){
$recordid = $row["ID"];
echo("<tr><td>" . $row["field1"] . "</td>");
echo("<td>" . $row["field2"] . "</td>");
echo("<td>" . $row["field3"] . "</td>");
echo("<td>" . $row["field4"] . "</td>");
echo("<td>" . $row["field5"] . "</td>");
echo("<td>" . $row["field6"] . "</td>");
echo("<td>" . $row["field7"] . "</td>");
echo("<td>" . $row["field8"] . "</td>");
echo("<td>" . $row["field9"] . "</td>");
echo("<td><a href='displayrecorddetail.php?drecord=recordid...
}
// determine the next page
if(!$page)
$next_page = 2;
else
$next_page = $page + 1;
echo "<tr><td colspan=10><a href=\"" . $PHP_SELF . "?
page=" . $next_page . "\">Next Page</a></td></tr>
?>
Should I create a separate page to display the summary result rows and then manipulate the displaying of data using the "Next Page" link on that page instead of redisplaying the form submission page?