This  is a snippet of what I use:
 foreach ($HTTP_POST_VARS  as $Index=>$Value) {
  echo "DEBUG ::: POST Key: $Index; POST Value: $Value<br>\n";
But I just want to know why sometimes when the form has empty values, that
sometimes it prints the key's name but not the actual value.
Assume the form has a textbox with name="FirstName", sometimes I get
DEBUG ::: POST Key: FirstName; POST Value:
empty string
it looks like the first case has FirstName as a key in the POST array, where
as the latter doesn't.

<[EMAIL PROTECTED]> wrote in 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
> - Hébergement de sites Internet
> "Anup" <[EMAIL PROTECTED]> a écrit dans le message de news:
> > 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
> > is left blank, sometimes my script will print the key and NO value, or
> > 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
> > 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
> > to check for validilty using isset all the time or should I put it in
> > in case the script gets moved. I want to pinpoint this so that I can
> > more effective code.
> >
> >
> >
> >

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to