FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Syntax for array?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Syntax for array? [message #169723] Fri, 24 September 2010 03:46 Go to previous message
GarryJones is currently offline  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.
[Message index]
 
Read Message
Read Message
Previous Topic: I need Help
Next Topic: Tokan error & 401 fatal error while running google analytics API code on dedicated server
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 23:09:07 GMT 2024

Total time taken to generate the page: 0.05404 seconds