Witam problem polega na tym ze niechce zaladowac danych z mysql

Kod:
  1. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  2. <script type="text/javascript" src="mintAjax.js"></script>
  3.  
  4. <script type="text/javascript">
  5. function SendRequest(formik)
  6. {
  7. var req = mint.Request();
  8.  
  9. req.OnAbort = function()
  10. {
  11. alert("Serwer ma problemy z odebraniem zapytania. Spróbuj ponownie późnej.");
  12. }
  13. req.OnLoading = function()
  14. {
  15. $("response").style.display = "block";
  16. $("response").innerHTML = "<img src=\'loader.gif\'>";
  17. }
  18. req.OnSuccess = function(){
  19. $("response").innerHTML = this.responseText;
  20. }
  21. req.SendForm(formik);
  22. }
  23.  
  24. function pokaz(){
  25. var co = mint.Request();
  26.  
  27. co.OnLoading = function() { $("load").innerHTML='<img src="loader.gif">'; }
  28.  
  29. co.Send("gracze.php");
  30.  
  31. co.OnSuccess = function(){
  32.  
  33. $("load").innerHTML = this.responseText;
  34. }
  35. }
  36. pokaz();
  37. </script>
  38.  
  39. <div id="response"></div>
  40. <div id="load"></div>
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48. ///PLIK gracze.php
  49. <?php
  50. ini_set('display_errors','1');
  51. define('DB_HOST','localhost');
  52. define('DB_NAME','tester');
  53. define('DB_USER','root');
  54. define('DB_PASS','');
  55. require_once('./mysqlclass.php');//Lib od bazy
  56. $db = new sqlcon();//Zalączanie obiektu
  57.  
  58. function players_list(sqlcon $db)
  59. {
  60.  
  61.  
  62. <table><tr><td>Nr</td><td>Imię i Nazwisko</td><td>Status</td><td>Akcja</td></tr>';
  63.  
  64. $query = $db->query("SELECT * FROM players ORDER by nr asc");
  65. while($row = $db->fetch_assoc($query))
  66. {
  67.  
  68. echo '
  69. <form id="form'.$row['id'].'" method="POST" action="update.php">
  70. <tr>
  71. <td><input type="text" name="nr" size="5" value="'.$row['nr'].'" /></td>
  72. <input type="hidden" name="id" value="'.$row['id'].'"/>
  73. <td><input type="text" name="name" size="40" value="'.$row['player_name'].'" /></td>
  74. <td><input type="text" name="status" size="40" value="'.$row['status'].'" /></td>
  75. </form><td><button onclick="SendRequest(form'.$row['id'].')">Zapisz</button></td>
  76. </tr>';
  77. }
  78. echo' </table>';
  79. }
  80.  
  81.  
  82.  
  83. players_list($db);
  84.  
  85.  
  86.  
  87. ?>




Proszę o pomoc updetowanie działa ale listy nie chce pobrać