save.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. $servername = "localhost";
  3. $username = "jrustler_uscore";
  4. $password = "12345";
  5. $dbname = "jrustler_fscore";
  6. // Create connection
  7. $conn = new mysqli($servername, $username, $password, $dbname);
  8. // Check connection
  9. if ($conn->connect_error) {
  10. die("Connection failed: " . $conn->connect_error);
  11. }
  12. $ip = $_REQUEST["s_ip"];
  13. $play = $_REQUEST["s_name"];
  14. $date = date("Y-m-d H:i:s");
  15. $lang = $_REQUEST["s_lang"];
  16. $game = $_REQUEST["s_game"];
  17. $mode = $_REQUEST["s_mode"];
  18. $oper = $_REQUEST["s_oper"];
  19. $leve = $_REQUEST["s_leve"];
  20. $posi = $_REQUEST["s_posi"];
  21. $resu = $_REQUEST["s_resu"];
  22. $time = $_REQUEST["s_time"];
  23. $deta = $_REQUEST["s_deta"];
  24. $sql = "INSERT INTO `score`
  25. (`s_hostip`,
  26. `s_playername`,
  27. `s_datetime`,
  28. `s_lang`,
  29. `s_game`,
  30. `s_mode`,
  31. `s_operator`,
  32. `s_level`,
  33. `s_mappos`,
  34. `s_result`,
  35. `s_time`,
  36. `s_details`)
  37. VALUES(
  38. '$ip',
  39. '$play',
  40. '$date',
  41. '$lang',
  42. '$game',
  43. '$mode',
  44. '$oper',
  45. $leve,
  46. $posi,
  47. '$resu',
  48. $time,
  49. '$deta')";
  50. if ($conn->query($sql) === TRUE) {
  51. echo "Grabado";
  52. } else {
  53. echo "Error: " . $sql . "<br>" . $conn->error;
  54. }
  55. $conn->close();
  56. ?>