local = new Tablocalite(); } public function index() { $tabpays = $this->local->getpayslocalite(); $tabville = array(); $this->genererVueAjax(array( 'pays' => $tabpays, 'ville' => $tabville )); } public function ajouter(){ $codeLocalite = strtoupper($this->requete->getParametreFormulaire("codeLocalite")); if (!$this->local->existeligne($codeLocalite)){ $libelle = strtoupper($this->requete->getParametreFormulaire("libelle")); $codePays = strtoupper($this->requete->getParametreFormulaire("codePays")); $codeVille = strtoupper($this->requete->getParametreFormulaire("codeVille")); $this->local->ajouterlocalite($codePays,$codeVille,$codeLocalite,$libelle); }else{ echo 'Erreur: Le code saisi existe déjà! Veuillez entrer un autre./Error : The code entered already exists! Please enter another.'; die(); } } }