multidimensional arrays - form menu/list boxes
Posted: Tue Oct 14, 2003 8:11 pm
I have a form that uses list/menu boxes to allow a user to select multiple items from the list. Once selected these items are to be logged into a sql database, each selected item as its own seperate insertion into the table.
I understand that the list boxes submit variables as arrays. How can I setup my insert sql statment to insert the value of each item into the table seperately?
I thought about using a loop to do this, where the insert clause would loop until the list of items in the array ended. The table would have 2 columns aside from the unique id column. one would be a set variable $pageid the other would be the array.
Does anybody know how to handle this situation?
Thanks.
I understand that the list boxes submit variables as arrays. How can I setup my insert sql statment to insert the value of each item into the table seperately?
I thought about using a loop to do this, where the insert clause would loop until the list of items in the array ended. The table would have 2 columns aside from the unique id column. one would be a set variable $pageid the other would be the array.
Does anybody know how to handle this situation?
Thanks.