I'm dynamically constructing a form based on a query's result...the purpose of the form will be to either add or remove records from a table in a mysql database.
I'm quite stumped, though, on how to pass the variables that result from the form's submission either to another function on the same page, or to another page; as there isn't anyway of determining which or how many variables will be created at submission before the form is built!
Is there a way to pull this off, or am I, as I suspect, up the proverbial creek? Below is a bit of how I'm building the form:
$getNames = mysql_query("SELECT Group_Name from toolbox_groups ORDER BY Group_Name ASC");
while ($names = mysql_fetch_row($getNames)){
echo "<table><tr><td colspan=2>$names[0]</td></tr>";
$getTools = mysql_query("SELECT Item_ID, Item_Name, Item_Desc from toolbox_items WHERE Item_Group_Name = '$names[0]' ORDER BY Item_Name ASC");
while ($tools = mysql_fetch_row($getTools)){
echo "<tr><td><input type=checkbox name=$tools[1] value=$tools[0]>$tools[1]</td><td>$tools[2]</td></tr>";
}
echo "</table>";