PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 11th, 2004, 06:26 AM
thoroughfare thoroughfare is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 1 thoroughfare User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cool Submitting list values and retrieving them in PHP

Hi

I need to be able to submit a bunch of list values to PHP. See this page:

http://webdeveloper.earthweb.com/repository/javascripts/2002/02/75691/twoselect.html

Imagine that I want to send all the items in the left list to PHP. Any help would be gratefully appreciated!

Many thanks,
Matt

Reply With Quote
  #2  
Old October 11th, 2004, 09:24 AM
pocketsized pocketsized is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Brunei
Posts: 26 pocketsized User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Code:
<select name="category_name" multiple size="5" style="width=150px" width="150px">


Since your select list allows a user to select more than 1 option, you'll need to rename it as an array:

Code:
<select name="category_name[]" ...


Notice the extra brackets in the name.

Reply With Quote
  #3  
Old October 11th, 2004, 05:04 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
have you tried doing a print_r() on the $_POST and/or $_GET variables to see how the information is passed.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Submitting list values and retrieving them in PHP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT