moved things

This commit is contained in:
2024-10-23 21:45:15 +02:00
parent 3fc8d2fd74
commit aeca2e31df
21 changed files with 186 additions and 131 deletions

View File

@@ -0,0 +1,25 @@
<?php
function ConnectDataBase()
{
global $db;
try {
$host = "localhost";
$user = "root";
$password = "motdepasse";
// Connexion à la bdd
$db = new PDO("mysql:host=$host;dbname=cruddb", $user, $password);
$db->exec('SET NAMES "UTF8"');
} catch (PDOException $e) {
echo 'Erreur : ' . $e->getMessage();
die();
}
}
function CloseDataBase()
{
global $db;
$db = null;
}