I'm new to this forum, so sorry in advance, if I do something wrong.
I've got a checklist on my page, which user can check and submit:
Code: Select all
<input type="checkbox" name="checkbox[]" value="foods" />
<input type="checkbox" name="checkbox[]" value="drinks" />
<input type="checkbox" name="checkbox[]" value="cold drinks" />Code: Select all
$categories = $_POST['checkbox'];So how do I store this definition into an sql database with the article name?
For example when user wants to store a "milk", which they select it belongs
to drinks and cold drinks, then $categories contains array of [0] => drinks [1] => cold drinks
So what query, please, should I send, to store the categories definition?
Thanks in advance!
RiMMER