MySQL/PHP - Passing/Using Multiple Variable Values

  • Nigel10
  • Born
  • Born
  • No Avatar
  • Joined: May 01, 2004
  • Posts: 1
  • Status: Offline

Post May 1st, 2004, 6:41 am

I would be grateful for any help with this problem using PHP with a MySQL database....

I have a search form facility based on a drop-down list (of products). I want searchers to be able to select more than one product from the drop-down to be used as search criteria. I have set up the form to allow multiple selections.

The variable values get passed in the form, e.g.

AdvancedResults.php?Products=AC&Products=BA

but it is only the second value that is 'held' and can be used.

How can I pass multiple values for a single variable to enable results from the database to be generated on a 'this value AND that value' basis?????

Many thanks
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post May 1st, 2004, 6:41 am

  • Axe
  • Genius
  • Genius
  • User avatar
  • Joined: Jan 07, 2004
  • Posts: 5744
  • Loc: Sub-level 28
  • Status: Offline

Post May 1st, 2004, 10:11 am

you can't select multiple items in a drop-down list, only a regular list box.
  • diverdan
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Apr 18, 2004
  • Posts: 46
  • Loc: Alabama, USA
  • Status: Offline

Post May 1st, 2004, 3:19 pm

http://www.phpnoise.com/tutorials/6/4

you have to make the form item an array

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 177 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.