I have a jobs table in our MySQL database that contains the following fields:
OpenJobID int(11)
JobID int(11)
RestuarantID int(11)
DateOpened
DateFilled
There are 4 JobIDs stored in a separate table with descriptions.
In my web application, after the user selects the appropriate restaurant via dropdown box, I want to provide a checkbox for each of the for JobIDs. The user would select 1-4 jobs to post and press the submit button.
Is it possible to “bulk” insert up to 4 entries in my jobs table based on the number of checkboxes selected? Should I set an array for the 4 checkboxes and create nested if..then statements where if checkbox1.value=true then insert blah into jobs?
If I understood correctly your question you will need:
and this will produce one array in PHP