Re: form question
| From: | Steve Edberg | Date: | Wed, 19 Jul 2000 05:33:14 +0000 |
| Subject: | Re: form question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7216@lists.php.net to get a copy of this message | ||
At 3:42 PM -0300 7/18/00, Martin A. Marques wrote:
I have a form that calls another php script, and I need to know which variables the form passed to the new script to make a new query.Is the method POST? Use $HTTP_POST_VARS Is the method GET? Use $HTTP_GET_VARS The track_vars setting must be on (in .htaccess, php.ini, or httpd.conf) for this to be useful. Also be aware that elements of the above arrays may _themselves_ be arrays - for instance, if you used array form variables (...name="some_stuff[]"...) Remember that if you are trying to process these arrays in a subroutine, you need to globalize them: function process_form() { global $HTTP_POST_VARS; ... } or refer to them as elements of the $GLOBALS array: function process_form() { ... $get_vars = $GLOBALS['HTTP_GET_VARS']; ... } -steve +--- unix and cats: -----------------------------------------------------+
| Steve Edberg University of California, Davis | | sbedberg@ucdavis.edu Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu |+----------------------- hard to befriend, but then friends for life! ---+