[PHP] Accessing multiple List/Menu values
This is sorta OT, but involves PHP. I have a fairly large List/Menu on a form, which allows for multiple selections. I want users to be able to use cntrl/shift-click to select a bunch of items. Let's say this List is called 'list'. Now when I submit the form, how does the processing script access all these different values in 'list'? If I try to echo '$list' it only show *one* of the selected items from the list. I've tried treating it as an array ($list[0], $list[1], etc), but that doesn't work either. How do I get at the different values? Thanks, -- : Joseph Szobody : Computers are like airconditioners: They stop working properly if you open windows. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Accessing multiple List/Menu values
Search the archives...this has been answered by me and many others... B i g D o g - Original Message - From: Joseph Szobody [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 10, 2002 12:02 PM Subject: [PHP] Accessing multiple List/Menu values This is sorta OT, but involves PHP. I have a fairly large List/Menu on a form, which allows for multiple selections. I want users to be able to use cntrl/shift-click to select a bunch of items. Let's say this List is called 'list'. Now when I submit the form, how does the processing script access all these different values in 'list'? If I try to echo '$list' it only show *one* of the selected items from the list. I've tried treating it as an array ($list[0], $list[1], etc), but that doesn't work either. How do I get at the different values? Thanks, -- : Joseph Szobody : Computers are like airconditioners: They stop working properly if you open windows. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Accessing multiple List/Menu values
Have you tried like this? select name=list[] size=5 multiple option value=yahooYahoo!/option ... option value=phpnetPHP.net/option /select Then access the array on the processing page. Martin Joseph Szobody [EMAIL PROTECTED] 07/10/02 02:02PM This is sorta OT, but involves PHP. I have a fairly large List/Menu on a form, which allows for multiple selections. I want users to be able to use cntrl/shift-click to select a bunch of items. Let's say this List is called 'list'. Now when I submit the form, how does the processing script access all these different values in 'list'? If I try to echo '$list' it only show *one* of the selected items from the list. I've tried treating it as an array ($list[0], $list[1], etc), but that doesn't work either. How do I get at the different values? Thanks, -- : Joseph Szobody : Computers are like airconditioners: They stop working properly if you open windows. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php