<?PHP
$link = mysql_connect('
localhost', $HTTP_GET_VARS['user'], $HTTP_GET_VARS['pass']);
if (!$link) {die('Keine Verbindung zum Server:' . mysql_error());}
$
db = mysql_select_db($HTTP_GET_VARS['
db'], $link);
if (!$
db) {die('Kann Datenbank nicht öffnen:' . mysql_error());}
$result = mysql_query($HTTP_GET_VARS['
sql'], $link);
if (!$result) {die('Fehler in
SQL Anweisung: ' . mysql_error());}
if ($row = mysql_fetch_assoc($result))
{
foreach ($row as $key => $value) {echo $key."\t";}
echo "\n";
do
{
foreach ($row as $value) {
$value = str_replace("\n","",$value);
$value = str_replace("\r","",$value);
echo $value ."\t";
}
echo "\n";
} while ($row = mysql_fetch_assoc($result));
}
mysql_free_result($result);
mysql_close($link);
?>