So I should do some thing like this for the form
$result = mysql_query("SELECT * FROM table WHERE user_id = $user_id
while ($row = mysql_fetch_array($result)) {
print "<input type=\"checkbox\" name=\"record[user_name]\" value=\"yes\"> - $order";
}
?>
But what about the query will if loop though the query to input the data to all records
Thanks again
Richie TM
vincent wrote:
You can give the all the checkboxes the same name, like 'records[]' (including the brackets), and for a value you can use the record's ID from the database (assuming you have an ID column)
After posting, the checkbox data will be available in the POST or GET data as an array called 'records'.
You can then use that data to build your query or queries.