SAE_203_Gestion_des_sauveteurs/models/connection.php
2026-06-08 14:16:59 +02:00

14 lines
281 B
PHP

<?php
/**
* Create a PDO connection
* @return PDO
*/
function connection() {
//Loads config from file config.php
require('config/config.php');
//Db connection
$connex = new PDO('mysql:host=' . HOST . ';dbname=' . DB,USER , PASSWORD);
return $connex;
}