Jump to content

Help with feedback form


RKTckr

Recommended Posts

I am very new to HTML but am trying to teach myself just enough to update a church website. I have created a form and a php file to obtain survey results which is working surprisingly well. I need help with retrieving information from the form using checkboxes. I have a question with about 15 different options that I want the users to be able to pick and choose several of the options. What is the php record suppose to look like? Here is a section of the HTML file. All help will greatly be appreciated.

<tr><td>4. What kind of issues would you see helpful to you as possible topicsof study? </p><p style="font-family: comic sans ms;"><inputvalue="Family Relationships" name="study" type="checkbox">Family Relationships<input value="Financial Matters" name="study" type="checkbox">Financial Matters<small><br><br></small><input value="Improving your Prayer Life" name="study" type="checkbox">Improving your Prayer Life<input value="Having Stronger Faith" name="study" type="checkbox">Having Stronger Faith<br><br><input value="Becoming a more effective Witness" name="study" type="checkbox">Becoming a more effective Witness<input value="Being an Encourager" name="study" type="checkbox">Being an Encourager<br><br>

Thank you!

Link to comment
Share on other sites

Use array syntax to put your checkbox values in an array:name="study[]"In PHP you can loop through that array and do whatever you want to do with the submitted values.

foreach ($val in $_POST['study']){  echo $val;}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...