public function update() { $id = $_POST['id']; $name = $_POST['name']; $description = $_POST['description']; $start_date = $_POST['start_date']; $end_date = $_POST['end_date']; if (!empty($_POST['state'])) { $state = "2"; } else { $state = "1"; } Concours::update($id, $name, $description, $start_date, $end_date, $state); $lotName = $_POST['lotName']; $lotDescription = $_POST['lotDescription']; $imageId = $_POST['imageId']; $albumId = "1676393335976779"; Lot::update($lotName, $lotDescription, $id, $imageId, $albumId); }