I have a form with multiple checkboxes representing the cost; the value of those comes from the database.
<input type="checkbox" name="check" value="12.00" />
<input type="checkbox" name="check" value="40.00" />
On submitting the form, I use javascript to add the checked values together and post that new value in a hidden field.
<input type="hidden" name="total_cost" value="" />
I need to pass the row id from the database with the cost value for each checkbox. that way, when I check one or more checkboxes and submit the payment I need to change the status to PAID from NOT PAID.
Note: It is not possible for me to change the status while checking the checkbox. I can only change the status only after all the the transaction is completed.

if(!isset($_POST['var'])){ $status = "PAID"; }else{ $status = "NOT PAID"; }