<?php
// session_start();
//DATABASE DETAILS
//SET HOSTNAME
$hostname = "localhost";
//MYSQL USERNAME
$username ="root";
//MYSQL PASSWORD
$password="";
//MYSQL DATABASE NAME
$database="cms";
//DATABASE CONNECTION
try
{
$bdd=new PDO('mysql:host='.$hostname.';dbname='.$database,$username,$password,array(PDO::ATTR_ERRMODE=> PDO::ERRMODE_EXCEPTION));
// $bdd=new PDO('mysql:host=localhost;dbname=groupaccess','root','',array(PDO::ATTR_ERRMODE=> PDO::ERRMODE_EXCEPTION));
}
catch(Exception $e)
{
die('Erreur:'.$e->getMessage());
}
//DATABASE CONNECTION CODE END
?>
|