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