Hello everyone! This is regarding PHP & MySQL.
I have a form that website users fill out and send me there comments. Using a PHP script I created, the comments are posted to a MySQL table and I retrive them via a private admin section.
My Questions:
How do I use HTML Form Checkboxes to collect multiple answers for one question? What Column Data String Type should I use to store the answers? I tried using VARCHAR but it only stores one checkbox even when the user selects more.
Here is the html I use for the form question.
All the checkboxes are named the same, which is I belive how it should be:
Preferred Response Methods:
Code: Select all
<input type="checkbox" name="Respond_Via" value="E-mail" border="0"> E-mail.
<input type="checkbox" name="Respond_Via" value="Phone" border="0"> Phone.
<input type="checkbox" name="Respond_Via" value="Fax" border="0"> Fax.
<input type="checkbox" name="Respond_Via" value="Mail" border="0"> Mail.
<input type="checkbox" name="Respond_Via" value="None" border="0"> None.- Steve
Just incase you need to know.. my current setup is:
Solaris 2.7 release 05/99
Apache 1.3.3
MySQL Version 11.15 Distribution 3.23.43
PHP 4.1.0 Apache Modules