Simple website with some JavaScript games.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
881 B

  1. <?php
  2. //5-16-17
  3. include_once '../../club_connect.php';
  4. if(isset($_POST['game_new_score']))
  5. {
  6. $i_game = mysqli_real_escape_string($dbc, trim($_POST['game']));
  7. $i_user_id = mysqli_real_escape_string($dbc, trim($_POST['user_id_score']));
  8. $i_score = mysqli_real_escape_string($dbc, trim($_POST['score_validate']));
  9. //
  10. // foreach ($_POST as $key => $value)
  11. // {
  12. // echo $value . '<br>';
  13. // }
  14. $q = "insert into scores(game, user_id, score) values('$i_game','$i_user_id','$i_score')";
  15. if($i_user_id > 0)
  16. {
  17. $r = mysqli_query($dbc, $q);
  18. }
  19. //
  20. //
  21. // echo '<h1>' . $q . '</h1>';
  22. if($i_game == 1)
  23. {
  24. header("Location: bamboofield.php");
  25. }
  26. }
  27. ?>