function set_JSON_item($info,$mid) { global $conn; $info = mysqli_real_escape_string($conn, $info); $query = "UPDATE table1 SET info='$info' WHERE id=".$mid; $result = $conn->query($query); }