summaryrefslogtreecommitdiffstats
path: root/do.php
diff options
context:
space:
mode:
Diffstat (limited to 'do.php')
-rw-r--r--do.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/do.php b/do.php
index 8ff2162..b49fc29 100644
--- a/do.php
+++ b/do.php
@@ -177,6 +177,15 @@ if ($_GET['r'] == 'getpath') {
`mapID` = '$mapID'
";
mysql_query($sql);
+ //Update the solution, if it's the same score.
+ } elseif ($reqMoves == $moves) {
+ $sql = "UPDATE `solutions`
+ SET `moves` = '$moves' ,
+ `solution` = '$solution'
+ WHERE `userID` = '$userID' AND
+ `mapID` = '$mapID'
+ ";
+ mysql_query($sql);
}
} else {
//Store solution.