<?php

$DBNAME 
"";
$DBUSER "";
$DBPASS "";
$DBHOST "";

mysql_connect$DBHOST$DBUSER$DBPASS );
mysql_select_db$DBNAME );

echo 
"<table width=\"100%\" border=\"1\">";

$result mysql_query"SHOW COLUMNS FROM `searches`;" );

echo 
"\t<tr>\n\t";

while ( 
$row mysql_fetch_assoc$result ) ) {
    echo 
"<th>" $row['Field'] . "</th>";
}

echo 
"\t</tr>\n";

$result mysql_query"SELECT * FROM `searches`;" );
$cols mysql_num_fields$result );

while ( 
$row mysql_fetch_array$result ) ) {
    echo 
"\t<tr>\n\t";

    for ( 
$i $i $cols $i++ ) {
        echo 
"<td>" $row[$i] . "</td>";
    }
    
    echo 
"\t</tr>\n";
}

echo 
"</table>";

?>