Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fichero 1, config.php
- <?php
- mysql_connect($serverIP,$user,$password) or DIE ("No se pudo establecer conexion con el servidor.");
- mysql_select_db($dbaseName) or DIE ("No se pudo conectar a la base de datos.");
- ?>
- // Fichero 2, mostrarRanking.php
- <?php
- require("config.php");
- $query = mysql_query("Select * from ranks order by points Desc");
- echo "<table>";
- while ($a=mysql_fetch_array($query))
- {
- echo "<tr><td>Name</td><td>".$a['lastDisplayName']."</td><td>Points:</td><td>".$a['points']."</td></tr>";
- }
- echo "</table>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement