i have a form that contains checkboxes. I’ve named the checkboxes as stream[], so it’s an array of checkboxes.
I would like to insert the checkbox values if it is checked.
<p><input type="checkbox" name="stream[]" value="survey" id="svy"/>Survey</p>
<p><input type="checkbox" name="stream[]" value="write_review" id="wr">Write Review</p>
<p><input type="checkbox" name="stream[]" value="fb post" id="fbp">Facebook Post</p>.
How do i do that?
should not be that difficult, check out this link and this. But the essential idea is to know the right way to access the checkbox. Below is the general idea, a little homework for you to do the necessary changes to the code below to suit your situation.