From 57ba05a678b7b07be1bb4be6175063f348dbce14 Mon Sep 17 00:00:00 2001 From: Leander Date: Wed, 5 Apr 2017 10:22:24 +0200 Subject: [PATCH] T201704051022 --- answer.php | 2 +- highscores.php | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 highscores.php diff --git a/answer.php b/answer.php index b388227..734eda2 100644 --- a/answer.php +++ b/answer.php @@ -41,7 +41,7 @@ if($uid == '') { ['data'][0]['current_score']; $new_points = $old_points + $score; $db->query('UPDATE "Games" SET "current_score" = $1 WHERE "ID" = $2', array($new_points, $uid)); - $results = array('correct' => $correct, 'correctPos' => $correct_answer, 'score' => $score); + $results = array('correct' => $correct, 'correctPos' => $correct_answer, 'score' => $score, 'total' => $new_points); $old_time = $db->query('SELECT "total_time" FROM "Games" WHERE "ID" = $1', array($uid)) ['data'][0]['total_time']; $new_time = $old_time + $time; diff --git a/highscores.php b/highscores.php new file mode 100644 index 0000000..09c5834 --- /dev/null +++ b/highscores.php @@ -0,0 +1,11 @@ + \ No newline at end of file