Advertisement
Guest User

a

a guest
Jan 29th, 2012
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.28 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <link rel="stylesheet" href="StylesTSL.css" type="text/css" media="screen">
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Terraria Server List</title>
  7. </head>
  8. <body>
  9. <div id="page">
  10. <div id="logobase">
  11. <div class="filler"></div>
  12. <center><img src="logo.png" width="400" height="100"/></center>
  13. </div>
  14. <div class="filler"></div>
  15. <?php
  16. $page = $_GET['page'];
  17. addslashes($page);
  18.  
  19. $conn = mysql_connect("localhost","user","pass");
  20. if (!$conn)
  21. {
  22. die('Could not connect: ' . mysql_error());
  23. }
  24.  
  25. mysql_select_db("db", $conn);
  26. mysql_real_escape_string($page,$conn);
  27. $result = mysql_query("SELECT * FROM Servers WHERE id = '$page' LIMIT 1");
  28. $result2 = mysql_fetch_assoc($result);
  29. ?>
  30. <div class="servbox">
  31. <center>
  32. <h1><?php echo $result2['title'] ?></h1><br />
  33. <h2><span class="ip"><?php echo $result2['ip'] ?></span></h2><br /><hr /></center>
  34. <p><?php echo $result2['desc'] ?></p><br /><br />
  35. This is a <?php echo $result2['type'] ?> server.<br />
  36. Not what your looking for? <a href="http://bobcraft-games.com/TSL/">Return to our home page.</a>
  37. </div>
  38. </div>
  39. </body>
  40. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement