In this case, I have a form that dynamically adds (incrementing id and name values) a checkbox and a textarea. Since I do not already know how many checkbox/textarea combinations are going to be added I cannot just hard code to expect those and update.
Only the items I made red (below) are what go into this query. But how do I traverse through each set and ensure each checkbox and textarea get the same cr_num variable value. I'm sure I need a loop of some sort here, but not sure where to go...
This is the output from the form as I dump all the variables:
Analyst = mynamehere [color=red]cr_num = cr12345[/color] date = 010101 [color=red]Checkbox0 = on Tdescr0 = dfgdfgdgdfg Checkbox1 = on Tdescr1 = dfgdfg[/color] crsummary = summary here Submit1 = Submit
This is my query to insert the values:
$result = mysql_query ("INSERT INTO tasks (parent_cr, task_done, task_desc) VALUES ('$cr_num', '$Checkbox', '$Tdesc')");
Appreciate any help you can offer...