problem updating the db

hi, i’m new at php and my question might seem stupid, but here it goes…

i’ve created a table with information about production requests. The companies that receive the requests will then accept the requests or not. for this they see a table filterer by the companie (user logged in) and date (each request has a finish date and the company choosen ) then the table has a accepted field, with has a checkbox. in the form the checkbox appears with a “update record” button below. when i tick a checkbox and press the button it actually updates the table from 0 to 1. that’s the idea! but the problem is that it should be able to have only a submit button after the form that would update all the “accepted” fields with a tick at the same time, or i would have to click “update record” for each of the lines.

i read somewhere thay maybe using arrays would do the task, but i don’s know how…

thanks for any help…

You can use an array, or unique variable names for the checkbox(es), then when you press the SINGLE submit, you just need to check the values (either loop through the array or loop through each unique variable name) representing the check boxes. Based upon Checked or not checked, you do the update statement.

Sponsor our Newsletter | Privacy Policy | Terms of Service