10;"; $results = mysqli_query($connect, $query); */ $query = "DELETE FROM gps WHERE id='$id';"; //Delete the actual line and replace this line with the next lines $results = mysqli_query($connect, $query); //Execute the SQL command $query = "INSERT INTO gps (id,latitude,longitude,idMusic,dateLog) VALUES('$id','$latitude','$longitude','$idMusic',CURRENT_TIMESTAMP);"; //Insert into the database the new data and new information about this user $results = mysqli_query($connect, $query); //Execute the SQL command }else{ //If the method POST return nothing print (json_encode("The POST didn't return any values")); //Return a json string, so the dart script can interpret the error }