Thread: stupid question
View Single Post
 
Old December 10th, 2004, 12:31 AM
j_pres44 j_pres44 is offline
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default stupid question

Hi,

This might be a very simple question but I've spent far too much time trying to figure out why it isn't working:

I keep getting this parse error:

Parse error: parse error, unexpected ']', expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\sokkit\site\question_list.php on line 41

referencing this line: echo "<input type =\"checkbox\" name = \"'$chkQ[]'\" value =\"$Q_ID\"> $Question <BR>";

I am trying to put every possible selected value from a set of checkboxes into an array (chkQ[]) and sent that via POST to another page. If I take the brackets off, i.e. just have ' name=\"$chkQ\", then it will either a) not send anything in an array to the next page or b) will only send the last thing selected and when I search through the array it is, of course, undefined. Anyone with answers to my stupid question?

Thank you for your time.

- JP