setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/Medecins.php?type=creation"); $response->send(); }else{ $response = new Response(500); $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/Medecins.php?type=error"); $response->send(); } } public function delete($params){ if(MedecinRepo::delete($params['id_medecin']) !==FALSE){ $response = new Response(); $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/Medecins.php?type=supression"); $response->send(); }else{ $response = new Response(500); $response->setHeader('Location',"http://".$_SERVER['HTTP_HOST']."/Medecins.php?type=error"); $response->send(); } } }