I’m not sure exactly what this would be called- but I would like to create a single HTML form for multiple record updating. Like the “browse” function in phpMyAdmin, where it lists multiple records on a table with input fields and then updates them all at once.
I’m imagining that each record would have a unique ID, and that each dataset would somehow turn into an array- but how do you get an array from an HTML form?
I Imagine the first page would look like:
[code=php]
function ListCategories()
{
$Q = “SELECT * FROM Categories”;
$R = SafeQuery($Q, true);
if(mysql_num_rows($R) == 0)
{
$Out = “No rows”;
return $Out;
}
else
{
$Table = “<form><table>”;
$Table .= “<tr>”;
$Table .= “<td> </td>”;
$Table .= “<td>ID</td>”;
$Table .= “<td>Name</td>”;
$Table .= “<td>Order</td>”;
$Table .= “</tr>”;
while($W = mysql_fetch_array($R))
{
$Table .= “<tr>”;
$Table .= “<td><input type=’checkbox’ ></td>”;
$Table .= “<td>” . $W[‘CategoryID’] . “</td>”;
$Table .= “<td><input type=’text’ value='” . $W[‘CategoryName’] . “‘></td>”;
$Table .= “<td><input type=’text’ value='” . $W[‘CategoryOrder’] . “‘</td>”;
$Table .= “</tr>”;
}
$Table .= “</table></form>”;
}
return $Table;
}
But how does the receiving script work? Or what is this even called (so I can search for tutorials)?