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.

25 lines
602 B

  1. <?php
  2. //5-16-17
  3. include_once '../club_connect.php';
  4. if(isset($_POST['game_new_score']))
  5. {
  6. $i_game = $db->escapeString(
  7. trim($_POST['game']));
  8. $i_user_id = $db->escapeString(
  9. trim($_POST['user_id_score']));
  10. $i_score = $db->escapeString(
  11. trim($_POST['score_validate']));
  12. $q = "insert into scores(game, user_id, score)
  13. values('$i_game','$i_user_id','$i_score')";
  14. if($i_user_id > 0)
  15. $r = $db->query($q);
  16. if($i_game == 1)
  17. header("Location: bamboofield.php");
  18. else if($i_game == 2)
  19. header("Location: zombiePanda.php");
  20. }