GM Project 2012 (mod users)


/ Published in: PHP
Save to your folder(s)

user modding for a forum based gaming website (file used in password protected directory)


Copy this code and paste it in your HTML
  1. <body>
  2. <center>
  3. <?php
  4. /*connection data was moved to ext file '/connect/main.php'*/
  5. mysql_connect("localhost", "gamemer1_removed", "removed") or die('Could not connect to Serv: ' . mysql_error());
  6. mysql_select_db ('gamemer1_removed') or die('Could not connect to DB: ' . mysql_error());
  7.  
  8. $result = mysql_query("SELECT name,member_group_id,hwid FROM gamemer1_members");
  9.  
  10. if ($result == FALSE)
  11. {
  12. echo "Bad key result was returned";
  13. }
  14. else
  15. {
  16.  
  17. ?>
  18.  
  19. <form action="insert.php" method="post">
  20. Name <input type="text" name="ename" /><br>
  21. HWID <input type="text" name="ehwid" /><br>
  22. <input type="Submit" />
  23. </form>
  24.  
  25. <br><br><br>
  26. <table border="0" cellspacing="2" cellpadding="2">
  27. <tr>
  28. <td><font face="Arial, Helvetica, sans-serif">Group ID</font></td>
  29. <td><font face="Arial, Helvetica, sans-serif">User Name</font></td>
  30. <td><font face="Arial, Helvetica, sans-serif">HWID</font></td>
  31. </tr>
  32.  
  33. <?php
  34. $entry_name = $_POST['username'];
  35. $inhwid = $_POST['inhwid'];
  36.  
  37. while ($row = mysql_fetch_assoc($result)) {
  38.  
  39. $id = $row['member_group_id'];
  40. $name = $row['name'];
  41. $hwid = $row['hwid'];
  42. ?>
  43.  
  44. <tr>
  45. <td><font face="Arial, Helvetica, sans-serif"><?php echo $id; ?></font></td>
  46. <td><font face="Arial, Helvetica, sans-serif"><?php echo $name; ?></font></td>
  47. <td><font face="Arial, Helvetica, sans-serif"><?php echo $hwid; ?></font></td>
  48. </tr>
  49.  
  50. <?php
  51. }
  52. }
  53.  
  54. ?>
  55.  
  56. </center>
  57. </body>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.