Re: HTML_Quickform, exporValue() not working when getSubmitValue() does
| From: | Sergey Vasilyev | Date: | Mon, 24 May 2004 16:35:02 +0000 |
| Subject: | Re: HTML_Quickform, exporValue() not working when getSubmitValue() does | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-12704@lists.php.net to get a copy of this message | ||
In your form you have elements auth[0],auth[1],..... There is no
element named 'auth'. That's why exportValue('auth') is not working.
When you call exportValues(), result is returned as an associative
array, so an element with name 'element' in group 'auth[0]' and value
'value' will be returned as an array $arr, s.t.
$arr['auth'][0]['element']=='value'.
This is why you see key 'auth' in the array returned from exportValues().
Similar thing happens when php processes GET and POST data,
that's why getSubmitValue('auth') is working.
If you want to use exportValue, use exportValue('auth[0]'),
exportValue('auth[1]'), etc. while the call does not return an error.
Hope this helps,
Sergey
On Mon, May 24, 2004 at 12:32:21PM +0100,
Ian P. Christian wrote:
> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>
> I'm not sure if I'm understanding thigns wrong, but I can't see why on
> my form, getSubmitValue('auth') is working, but exportValue('auth')
> isn't,
>
> http://pookey.keme.net/radius/index.php shows a demo form where
> this
> is the case, add a few check and reply fields, then submit the form,
> and you are presented with a link to the source, and a few useful
> var_dumps.
>
> Any feedback welcome, even if it's stating the obvious, it's monday,
> i've probably missed something :)
>
> Kind Regards,
>
> Ian -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux)
>
> iD8DBQFAsd1FEe6ncNCcEO0RAuyEAJ9PmQ8XmNr2Xx3SGz88jC75t5bUoQCfQR1Y
> uuBph69WdYWHunIIhoPOb6s= =lG40 -----END PGP SIGNATURE-----
>
> -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe,
> visit: http://www.php.net/unsub.php
>