\n";
echo "
\n\n\n";
echo "\n";
echo "\n";
echo "\n";
//Perform a query for rows and to populate
$f_names = mysql_query("SHOW COLUMNS FROM $table ");
//create some Variables
$cols = array();
$class=(($n % 2) == 0) ? 'white' : 'green';
//Fetch Query Results and Spit out Row Names
while ($row_n= mysql_fetch_assoc($f_names))
{
$cols[] = $row_n['Field'];
echo '| '. $row_n['Field'] ." | \n";
}
$result = mysql_query("SELECT * FROM $table ORDER BY $id");
while($row = mysql_fetch_assoc($result))
{
echo '
';
foreach ( $cols as $fieldname ) {
echo '| '. $row[$fieldname] ." | \n";
//echo '' . $row[$fieldname] . " | \n";
}
echo '
';
}
?>