Re: Problem retrieving $_POST values
| From: | Jon Westcot | Date: | Tue, 13 Nov 2007 16:37:56 +0000 |
| Subject: | Re: Problem retrieving $_POST values | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-264446@lists.php.net to get a copy of this message | ||
Hi Chris, et al.:
> > Here's a section of what comes back when I do this:
> >
> > [mls] => 1234567
> > [property_address] => Main St
> > [city_arr] => Array
> > (
> > [0] => CHNDHT
> > [1] => CHNDLR
> > [2] => GILBER
> > [3] => HIGLEY
> > [4] => MESA
> > [5] => TEMPE
> > )
>
> So it is there :)
>
> print_r($_POST['city_arr']);
After much wringing of hands and gnashing of teeth, I found the problem.
Typo. Of course. I'd only read over the code about a hundred times before
I asked for help, if that's any consolation.
> > > > Is there some (free <g>) way to test a php script outside of a web
page?
> > >
> > > cmd line you can do:
> > >
> > > php -l /path/to/file.php
> >
> > Is this something I can access through SSH? And will it show me
errors as the script executes?
>
> Oops, I thought you meant for parse errors. That won't tell you about
> anything else unfortunately.
Ah, don't "oops" anything! That tip was worth its weight in gold to me!
In fact, it told me where one of the typos was that was causing a syntax
error during the initial parsing. The other typo was more insidious (trying
to use count() as $count()), but just as deadly to the output.
Thanks for the great tips!
Jon