Re: QuickForm array processing

From: Date: Wed, 17 Aug 2005 07:25:11 +0000
Subject: Re: QuickForm array processing
References: 1 2 3 4 5 6 7 8  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20445@lists.php.net to get a copy of this message
On 8/17/05, Poncho Pilate <poncho@zoom.co.uk> wrote: > Thanks Justin, > > Magic Quotes was the problem, I had a script to addslashes to the > $_POSTed data if magic_quotes_gpc was on. > I guess I'll have to be more careful with that kind of thing! > Thank you again, much appreciated. Ok. First of all, don't use magic quotes. Second of all, don't blindly addslashes to post data. Your problem was that you ran addslashes on an array and got back "Array" the string. Turn your error_reporting to E_ALL and you *should* see warnings for this. See: http://pear.reversefold.com/dokuwiki/doku.php?id=phpfaqs#why_is_magic_quotes_gpc_bad > > Kind regards, > Mark > > On 17 Aug 2005, at 07:55, Justin Patrin wrote: > > > On 8/16/05, Poncho Pilate <poncho@zoom.co.uk> wrote: > > > >> dob day = $form_result['dob'][0]; > >> dob month = $form_result['dob'][1]; > >> dob year = $form_result['dob'][2]; > >> > >> country = $form_result['location'][0]; > >> region = $form_result['location'][1]; > >> area = $form_result['location'][2]; > >> > > > > These should be things like 'd', 'm', and 'Y' instead of 0, > > 1, and 2. > > However, since print_r didn't show these it's obviously not there. > > > > if you don't have the newest version of QF, please update and let us > > know if it helps. If it doesn't, check if magic_quotes is turned on in > > PHP. If it is, try turning it off. As a last resort...you're not > > altering $_POST in any way before you use QF are you? > > > > -- > > Justin Patrin > > > > -- > > PEAR General Mailing List (http://pear.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Justin Patrin

« previous php.pear.general (#20445) next »