Forum Moderators: coopster
I am unsure how to verify, if they select 3 check boxes, modify the corresponding rows annotation field, how to update this in the database? I am pretty confused on this issue. So how can i verify which box is checked, to obtain the user entered value for that row that is checked, then update the database with the newly entered text box value.
Please Help
Thanks.
I know nothing about Oracle but here's an example of what I do with checkboxes
<input type="checkbox" name="assign[<?php echo $unique_id?>]" value="Yes">
The idea is to get the user's unique id to make an array so it ends up something like
<input type="checkbox" name="assign[1]" value="Yes">
<input type="checkbox" name="assign[2]" value="Yes">
<input type="checkbox" name="assign[3]" value="Yes">
You'd make other fields with the same unique id key assignment.
Now when the form is posted you can grab the arrays
$assign = $_POST['assign'];
and do with it what you will.
The handiest thing is to use a foreach so you can grab the keys and use them in your logic.
foreach ($assign as $unique_id => $value) {
//update database based on $unique_id and it's associated $value
}
Maybe somebody else has a cleaner method but this works for me when building large tables that are editable.
Tim