how do I use same page for submit and results?
| From: | John A DAVIS | Date: | Thu, 06 Feb 2003 17:10:27 +0000 |
| Subject: | how do I use same page for submit and results? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-25492@lists.php.net to get a copy of this message | ||
On my choices page, there are only 3 radio buttons and a Submit button.
The page calls itself and runs a query on the database, displaying results. But the criteria buttons
are still at the top of the page above the results. Before, I had a combo box for certain choices
and I just did an "If (!$ComboBoxName) { yada yada} die;".
But now I'm not using anything that I can check except for the button click. Any ideas how to
do this?
echo "<form action=\"/inventorylist.php3\" method=POST>\n";
echo "<div align=left>";
echo "<table cellpadding=12 bgcolor=lightblue>\n";
//search page title
echo "<tr><font size= +1><b> Inventory
List</b></font><br></tr>";
echo "<td> <input value=\"Show List\"
type=\"submit\">";
echo "</td>";
echo "<td>";
echo "<b>Activity Status</b><br>";
echo " <input type=\"radio\" name =\"actstat\"
value=\"A\" checked>Active <br>";
echo " <input type=\"radio\" name =\"actstat\"
value=\"I\" >Inactive <br>";
echo " <input type=\"radio\" name =\"actstat\"
value=\"ALL\" >Both <br><br>";
echo "(takes a while to build complete inventory)";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "<br><br>";
die;
―-query and display code down here