Home »
Imported messages »
comp.lang.php »
Syntax for array?
Syntax for array? [message #169723] |
Fri, 24 September 2010 03:46 |
GarryJones
Messages: 21 Registered: September 2010
Karma:
|
Junior Member |
|
|
I am trying to use an array but cant get the syntax right.
I have a list of items all with an id.
In a form the user clicks a check box for the items he wants to see.
After the user has chosen his items I need to place the checkbox
values that are clicked into an array. I am unsure how to do this. All
the checkbox values have the same name but unique values.
Then I need to use a select statement to access the items that are in
the array.
SELECT * FROM mylist WHERE "syntax for itemid is in the array" ORDER
BY itemid
So simply put,
Question one, how to place chosen unknown checkbox values into an
array
Question two, how to restrict the select statemet only to items in
that array.
Any help greatly appreciated
Garry Jones
Sweden
PS
Previosly I had something similar but I knew the checkbox values to
check for. Then I laboriously used "post" and checked each value in
turn and selected one by one, but now I dont preknow the checkbox
values to check for as they are dynamicaly created each time a user
loads the form.
|
|
|
Goto Forum:
Current Time: Sun Nov 24 19:48:33 GMT 2024
Total time taken to generate the page: 0.04716 seconds