Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $server = "localhost";
- $username = "artyfici_titcumb";
- $password = "gdyj36E8kw";
- $con = mysql_connect($server, $username, $password) or die (mysql_error());
- mysql_select_db('artyfici_portfolio', $con) or die (mysql_error());
- $query = "SELECT * FROM idat102FlashScores ORDER BY playerScore DESC";
- $result = mysql_query($query) or die (mysql_error());
- ////////////////////////////////////////////////////////////////////////
- $body = "";
- // table headers
- echo "<table width="200">;
- echo "<tr>";
- echo "<th>Name</th>";
- echo "<th>Score</th>";
- echo "</tr>";
- while($row = mysql_fetch_array($result)){
- $name = $row['playerName'];
- $score = $row ['playerScore'];
- echo "<tr>";
- echo "<td>$name</td>";
- echo "<td>$score</td>";
- echo "</tr>";
- }
- // table footers
- echo "</table>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement