If I have a multiple choice on a form and want to store that in my DB, then how 
should I set up my table?  I have been reading up on these, but everyone seems 
to have a different opinion on how to accomplish this task.  What I am looking 
to do give the user a few options to check when submitting a form.  


<select name="sports" multiple id="sport_type">
<option value="baseball">Baseball</option>
<option value="football">Football</option>
<option value="soccer">Soccer</option>
<option value="hockey">Hockey</option>
</select>

Would my table look like this:

....
CREATE TABLE sports (
sports_id int(11) not null auto_incremement,
sport_name text not null,
primary key (sports_id)
);

INSERT INTO `tbl_options` VALUES (1, 'Baseball');
INSERT INTO `tbl_options` VALUES (2, 'Football');
INSERT INTO `tbl_options` VALUES (3, 'Soccer');
INSERT INTO `tbl_options` VALUES (4, 'Hockey');
...

Would using "text" as the way to store make it easier to retrieve the data in a 
manner that would be readable on a web page?

Thanks,
Nick

Reply via email to