2.2.4
[phpmyadmin/arisferyanto.git] / libraries / grab_globals.lib.php3
blob40087bd0f5fe1a96b9a440cc8f6f7e4290274ebf
1 <?php
2 /* $Id$ */
5 /**
6 * This library grabs the names and values of the variables sent or posted to a
7 * script in the '$HTTP_*_VARS' arrays and sets simple globals variables from
8 * them
10 * loic1 - 2001/25/11: use the new globals arrays defined with php 4.1+
12 if (!defined('PMA_GRAB_GLOBALS_INCLUDED')) {
13 define('PMA_GRAB_GLOBALS_INCLUDED', 1);
15 if (!empty($_GET)) {
16 extract($_GET);
17 } else if (!empty($HTTP_GET_VARS)) {
18 extract($HTTP_GET_VARS);
19 } // end if
21 if (!empty($_POST)) {
22 extract($_POST);
23 } else if (!empty($HTTP_POST_VARS)) {
24 extract($HTTP_POST_VARS);
25 } // end if
27 if (!empty($_SERVER) && isset($_SERVER['SCRIPT_NAME'])) {
28 $SCRIPT_NAME = $_SERVER['SCRIPT_NAME'];
29 } else if (!empty($HTTP_SERVER_VARS) && isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) {
30 $SCRIPT_NAME = $HTTP_SERVER_VARS['SCRIPT_NAME'];
31 } // end if
33 if (!empty($_FILES)) {
34 while (list($name, $value) = each($_FILES)) {
35 $$name = $value['tmp_name'];
37 } else if (!empty($HTTP_POST_FILES)) {
38 while (list($name, $value) = each($HTTP_POST_FILES)) {
39 $$name = $value['tmp_name'];
41 } // end if
43 } // $__PMA_GRAB_GLOBALS_LIB__