Re: Problem with $_POST variable
- From: "Ramius" <m.ramius@xxxxxxxxx>
- Date: 8 Apr 2005 09:19:37 -0700
Michal Wozniak wrote:
> > <?php
> > var_dump($_POST);
>
> Well, if you DUMP the $_POST var here...
>
> > $user=$_POST['login'];
> > $password=$_POST['password'];
>
> ... then obviously you won't get anything here. $_POST is dumped, so
> there is no such thing as $_POST[whatever]. Don't dump. :)
This is absolutely false.
The "dump" in var_dump should be thought of as "dumping output to
screen". It is analagous to print or echo. It does not unset the
variable, or change it in any way.
It is very useful to use var_dump in the way the original poster used
it, because "print" would not work ( $_POST is an array ) and "print_r"
would produce incomplete results ( because $_POST might contain nested
arrays ). var_dump will echo all the contents of $_POST which is
useful for testing purposes.
.
- Follow-Ups:
- Re: Problem with $_POST variable
- From: Jan Pieter Kunst
- Re: Problem with $_POST variable
- From: Michał Woźniak
- Re: Problem with $_POST variable
- References:
- Problem with $_POST variable
- From: arun . kumar . varma
- Re: Problem with $_POST variable
- From: Michał Woźniak
- Problem with $_POST variable
- Prev by Date: Re: Problem with $_POST variable
- Next by Date: Re: how to avoid multiple submit button click??????
- Previous by thread: Re: Problem with $_POST variable
- Next by thread: Re: Problem with $_POST variable
- Index(es):