|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PEAR Packages > quickform - passing hierselect values |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|