Please post the HTML document that is used to submit the form. We probably need to use an iterator like foreach() to access the multiple checkbox data -- we will know that when we see the HTML form.
austinfx
ASKER
Sometimes it helps to get direct answers the the actual questions posted.
To anyone coming across this question in the future, please read the WARNING first. This is the reason we asked to see the HTML and suggested the use of the foreach() iterator. However, because the author did not provide the HTML we are only able to issue a warning, and are unable to show the code that would have been appropriate to sanitize the external input. As written this code is incredibly dangerous and hackable. It would take no more than a few lines of code and a few minutes to ruin the database. Please take to heart the warning from NerdsOfTech and do not follow this model without understanding and mitigating the risks!
https://www.experts-exchange.com/articles/5450/Common-Sense-Examples-Using-Checkboxes-with-HTML-JavaScript-and-PHP.html
Please post the HTML document that is used to submit the form. We probably need to use an iterator like foreach() to access the multiple checkbox data -- we will know that when we see the HTML form.