diff options
Diffstat (limited to 'do.php')
-rw-r--r-- | do.php | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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.
|