amelioration

This commit is contained in:
2025-10-25 16:18:01 +02:00
parent bd2f89943f
commit 0324f4f9df
5 changed files with 48 additions and 35 deletions

14
php/pdo.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
$serveur = "localhost";
$dbname = "my_sql_projet";
$user = "root";
$pass = "root";
try {
$pdo = new PDO("mysql:host=$serveur;dbname=$dbname", $user, $pass);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
print "Erreur de connexion à la BDD : " . $e->getMessage();
die();
}
?>