Hey Guys!
I always come across geniuses here who have a solution for me…counting on everyone :thumb:
OK…I need to insert data from a form into my database and that data is an array. I googled the living snot out of this and didn’t gat any good, working solutions. So here’s a brief:
[list]
[]I know how to set up my form: <input type=“select” name=“category[]”>
[]I have all my options, and my form action is set to have the data processed by a separate .php page (duh)
[/list]When I click submit…what do I do with my array to get it into the database? Some additional details:
[list]
[]an id is generated and this is for a map table so the table has 2 columns, an id that relates to table1 and my categoryid that is gathered from the form that submitted this informartion as the array
[/list]So…for each categoryid that is entered into the map table, the generated id from table1 is inserted with it like this:
[list]
[]$table1id | $categoryid (the array from the form)
[]$table1id | $categoryid
[]$table1id | $categoryid
[*]etc.
[/list]Obviously, the $table1id doesn’t change. Let’s say it’s “12345”. I understand that the data entered will be:
[list]
[]12345 (from $generatedID - not an array) | 14 (from $category[0])
[]12345 (from $generatedID - not an array) | 07 (from $category[1])
[]12345 (from $generatedID - not an array) | 26 (from $category[3])
[]etc.
[/list]But I don’t know what to do with my array on the processing .php page. I only need to know what to do with the array…I know how my generated id is generated and all that…I simply need what I guess would be the $_POST[$category ARRAY] and the sql query.
I appreciate any help in advance!
peace,
gfx.wiz =8-)>