connection

This commit is contained in:
Logshiro
2025-10-10 11:15:38 +02:00
parent ef0b0bda5d
commit ef4da347f8
17 changed files with 93 additions and 2 deletions

31
public/index.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
session_start();
require_once __DIR__."/../controleurs/ControleurAuthentification.php";
// index.php?route=maRoute&param1=truc
// => route reçue en get
define("BASE_URL","/contribsavantrouteur/");
$route = isset($_GET["route"])? $_GET["route"] : null;
$pdo = new PDO("mysql:host=mysqlsrv;dbname=contrib",
"contrib_root",
"123abc");
if ($route=="coucou"){
$ctr = new ControleurAuthentification;
$ctr->coucou();
exit();
}
if ($route=="afficherFromCo"){
$ctr = new ControleurAuthentification;
$ctr->afficherFromCo();
exit();
}
if ($route=="traiterFromCo"){
echo "Je suis là";
$ctr = new ControleurAuthentification;
$ctr->traiterFromCo($pdo,$_POST["login"],$_POST["pass"]);
exit();
}
echo "Route inconnue";