<?php
define("SERVEURBD", "mysql");
define("LOGIN", "root");
define("MOTDEPASSE", "aberation");
define("NOMDELABASE", "raspsnirv2");

function connexionBD() {
    try {
        $bdd = new PDO('mysql:host=' . SERVEURBD . ';dbname=' . NOMDELABASE, LOGIN, MOTDEPASSE);
    } catch (Exception $ex) {
        die('<br/>Pb connexion serveur BDD : ' . $ex->getMessage());
    }
    return $bdd;
}
