
November 18th, 1999, 11:19 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
I have a fairly complicated form set up that uses a lot of "check all that apply" type questions (input type="checkbox" var name="blah[]" value="blah_value"). Now, I know the brackets mean that it should be passing whichever values have been checked off to my script and then to the database. My problem is, most of the values aren't making it into the database. Something's getting passed along, just not all the data. Where am I going wrong?
I've tried 5 different INSERT syntaxes:
INSERT INTO info VALUES('$prog_descr_text', '$purpose[]') gets me an SQL error which says it's expecting a number or $ in brackets.
INSERT INTO info VALUES('$prog_descr_text', '$purpose[0]') passes along the first checked value and nothing else.
INSERT INTO info VALUES('$prog_descr_text', '$purpose[$purpose]') passes along the last checked value and nothing else.
INSERT INTO info VALUES('$prog_descr_text', '$purpose') passes along "Array", but not the actual data.
INSERT INTO info VALUES('$prog_descr_text', '$purpose[11]') passes along nothing. (11 is the total number of values that could be passed along if all the boxes were checked.)
Any help is greatly appreciated!
Thanks in advance.
|