Re: Problem retrieving $_POST values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jon Westcot wrote:
Hi all:

    I'm having problems retrieving an array value that should be in a $_POST setting.  In fact, I'm having trouble with the code hanging with no warnings or errors whatsoever, so I've got no clue why it's not working.

    Working code:

    if(isset($_POST["mls"])) {
        if(strlen(trim($_POST["mls"])) > 0) {
            $query = "mls=" . $_POST["mls"];
        }
    }

    Non-working code:

    if(isset($_POST['city_arr'])) {
        // This space intentionally left blank.
    }

    The only thing I know that is different is that "mls" is a single value and that city_arr is an array.  I have tried expressing it as "city_arr[]" with no success.

    Does anyone have an example of how to reference the $_POST value when said value is an array?  I can't seem to find a sample of this anywhere in the manual.

Exactly as you have there.

print_r($_POST);

will show you everything.

How are you creating the field in your form?

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

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux