diff --git a/controller/AuthController.php b/controller/AuthController.php
index e69de29..495e910 100644
--- a/controller/AuthController.php
+++ b/controller/AuthController.php
@@ -0,0 +1,54 @@
+prepare($textR);
+ $req->bindParam(":login", $login);
+ $req->execute();
+
+ // 2 possibilités : 1 ligne retournée ou 0 ligne retournée
+ $tabRes = $req->fetchAll(PDO::FETCH_ASSOC);
+ if (count($tabRes)!=1) {
+ // pas trouvé => retour au formulaire de co
+ // die("Erreur de co");
+ header("Location:../index.php?message=tekitoa");
+ exit();
+ }
+
+ // Si on arrive là : login existe (count==1)
+ if (!password_verify($pass, $tabRes[0]["password"])){
+ // die("Erreur de co");
+ header("Location:../index.php?message=tekitoa");
+ exit();
+ }
+
+ $_SESSION["login"] = $login;
+ $_SESSION["droit"] = $tabRes[0]["droit"];
+
+ // redirection vers accueil, éventuellement spécifique à l'utilisateur
+ header("Location:../view/home.php");
+ }
+}
\ No newline at end of file
diff --git a/public/index.php b/public/index.php
index 910e2a3..05f3c3a 100644
--- a/public/index.php
+++ b/public/index.php
@@ -1,36 +1,34 @@
+ define("BASE_URL","/contribEvo/");
-
-
-
-
-
-
- Connexion
-
+ //index.php?route=maRoute¶m1=truc
+ // => receive get route
-
-
-
-
-
\ No newline at end of file
+ $route = isset($_GET["route"])? $_GET["route"] : null;
+
+ /*
+ if (isset($_GET["route"])) {
+ $route = $_GET["route"]
+ } else {
+ $route = null;
+ }
+ */
+ if ($route=="helloworld") {
+ $ctr = new AuthController();
+ $ctr->helloWorld();
+ exit();
+ }
+
+ if ($route=="displayConnForm") {
+ $ctr = new AuthController();
+ $ctr->displayConnForm();
+ exit();
+ }
+
+ if ($route=="handleConnForm") {
+ $ctr = new AuthController();
+ $ctr->handleConnForm();
+ exit();
+ }
diff --git a/_old/utils_inc/inc_navbar.php b/utils_inc/inc_navbar.php
similarity index 100%
rename from _old/utils_inc/inc_navbar.php
rename to utils_inc/inc_navbar.php
diff --git a/utils_inc/inc_pdo.php b/utils_inc/inc_pdo.php
new file mode 100644
index 0000000..471b926
--- /dev/null
+++ b/utils_inc/inc_pdo.php
@@ -0,0 +1,3 @@
+
+
+
+
+
+
+
+
+ Connexion
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/view/home.php b/view/home.php
new file mode 100644
index 0000000..25b9f4a
--- /dev/null
+++ b/view/home.php
@@ -0,0 +1,14 @@
+
+
+
+
+
+ Document
+
+
+
+
+
+ Hello et bienvenue, co OK.
+
+
\ No newline at end of file