At 10:53 AM +0530 2/12/11, Ashim Kapoor wrote:
I am reading "PHP5 and MySQL Bible". Chapter 7 of the book says that PHP can
use GET and POST in the SAME page! Also it says that we can use the SAME
variables in GET and POST variable sets and that conflict resolution is done
by variable_order option in php.ini Can some one write a small program to
illustrate the previous ideas? It is not clear to me as to how to implement
What others have not addressed is that the form used to send
variables will send only GET OR POST method variables, but not both
at the same time.
Using REQUEST will show the values of the variables sent, but will
not show what method was used (not addressing COOKIE) and that is the
reason why it's not the best idea to use REQUEST.
Furthermore, as you point out, conflict resolution is done in
accordance with variable order as set in the php.ini file and that
can be different between different environments. As such, a script
can act differently and there in lies the problem.
Now, I have used scripts that may receive POST or GET variables and
act accordingly, but you will never (except possibly AJAX) have a
situation where a script will receive both sets of variables at the
same time. So, I don't think one can write a small simple script that
can demonstrate this.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php