PEAR Packages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPEAR Packages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old April 18th, 2006, 08:08 AM
clivesgt clivesgt is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 17 clivesgt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 6 sec
Reputation Power: 0
quickform - passing hierselect values

hi

hope someone can help.

when using hierselect in quickform, i pass the selected array to another page. how do i get the info out of the array? i use foreach with key => value but just get integers and not the strings which are in the arrays.

eg main array has 'england' and 'scotland', 2nd array has 'london', 'manchester' and 'glascow', 'clyde' as the options. "$sel =& $form->addelement('hierselect', 'location','Location:');" sends the 'location' array to the next page but here i only get integers and not the actual strings i.e scotland,glascow if these were the selected items. how do i pass the actual strings to the next page using quickform?

appreciate any help.

thanks

Reply With Quote
  #2  
Old May 1st, 2006, 01:18 AM
marionconsulting marionconsulting is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 1 marionconsulting User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: quickform - passing hierselect values

These values are nested inside a multi-dimensional array. If your array of submitted values is called $values then get your data with the code below. If this doesn't work use print_r($values) to print out the data to the screen so you can determine how to extract the necessary values.

$country = $values['location'][0];
$location = $values['location'][1];

Good Luck.
Tony Marion

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPEAR Packages > quickform - passing hierselect values


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 4 hosted by Hostway