num_rows < 1) { JError("you cannot edit that device"); } //update $sql = "UPDATE `device` SET `name`='$name', `location`='$location', `description`='$description' WHERE `dev_id`='$dev_id'"; ExecQuery($mysqli, $sql); JSuccess("true"); ?>