//Retrive all the data from the table $result = mysql_query("SELECT * FROM stats2") or die(mysql_error()); echo "<table border='1' cellspacing='0' width='593'>"; echo "<tr> <th bgcolor='#BFBFBF' align='center'>Name</th> <th bgcolor='#BFBFBF' align='center'>Apps(Sub)</th> <th bgcolor='#BFBFBF' align='center'>Goals/CS</th> <th bgcolor='#BFBFBF' align='center'>Yellows</th> <th bgcolor='#BFBFBF' align='center'>Reds</th> <th bgcolor='#BFBFBF' align='center'>MOTM</th> </tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo "<tr><td align='center'>"; echo $row['name']; echo "</td><td align='center'>"; echo $row['apps']; echo '('; echo $row['sub']; echo ')'; echo "</td><td align='center'>"; echo $row['goals']; echo "</td><td align='center'>"; echo $row['yellows']"; echo "</td><td align='center'>"; echo $row['reds']; echo "</td><td align='center'>"; echo $row['MOTM']; echo "</td></tr>"; } echo "</table>";
echo <<<CSS<style type="text/css">td { font-family: courier; color: red; }</style>CSS;
<style type="text/css"> td { font-family: courier; color: red; } </style>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
Jump To Top of Thread