Re: detecting POST variables
| From: | nicos@php.net | Date: | Mon, 07 Oct 2002 23:49:57 +0000 |
| Subject: | Re: detecting POST variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119163@lists.php.net to get a copy of this message | ||
You should use
foreach($_POST as $key => $value) {
echo $key.':'.$value;
}
Btw thats just an example to get all $_POST values, all superglobals are
arrays.
--
Nicos - CHAILLAN Nicolas
nicos@php.net
www.WorldAKT.com - Hébergement de sites Internet
"Anup" <anup_patel@rogers.com> a écrit dans le message de news:
20021007230927.42240.qmail@pb1.pair.com...
> Hello, I have been dealing with different form proccessing PHP scripts.
When
> I start a new job I usually have a script that just takes the form POST
> values and prints them to the screen, so I know what I'm working with.
Now
> I have a question say the form has 1 field named "FirstName". If the field
> is left blank, sometimes my script will print the key and NO value, or it
> will just print out nothing, ie NO key or value.
>
> any ideas. Could it be the server (IIS or Unix/Linux) of the form and the
> server (IIS or Unix/Linux) of the script.?
> Since I do jobs for different people and environments any combination of
> servers are possible.
>
> The reason, for this post is that I don't know if I should always put code
> to check for validilty using isset all the time or should I put it in just
> in case the script gets moved. I want to pinpoint this so that I can write
> more effective code.
>
>
>
>