// Array Helpers $TourCat= array( "Pré-minimes","Minimes","Cadets","Scolaires","Juniors","Seniors","Elites" ); $TourType= array( "Hommes","Femmes","Mixte","Famille"); $TourYear= array( date('Y'),date('Y', strtotime('+1 year')) ,date('Y', strtotime('+2 year'))); require_once '../../../Models/Tournaments.php'; // New Helper to use the functions $id=$_GET["id"]; $Tour= new TournamentsModel(); // Performing a select with all "*" and specifiying the TournamentId to edit $results = $Tour->SelectSpecific("*",array( "TournamentId" => $id )); $results=$results[0]; //If an edit is performed if(! empty($_POST)) { $data=$_POST; $answer=$Tour->Update($data,array( "TournamentId" => $id )); header("Location: ./index.php"); } ?> <h4>Ajouter un tournoi</h4> <form method="post">