<?php
$host = 'localhost';
$dbname = 'nom_de_la_base_de_donnees';
$user = 'nom_utilisateur';
$password = 'mot_de_passe';
try {
$bdd = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8", $user, $password);
} catch (Exception $e) {
die('Erreur : ' . $e->getMessage());
}
?>
Comments