PHP Classes

File: config.php

Recommend this page to a friend!
  Classes of zinsou A.A.E.Moïse   tinyUGatMs   config.php   Download  
File: config.php
Role: Auxiliary script
Content type: text/plain
Description: database configuration
Class: tinyUGatMs
Manage users and groups of events in a database
Author: By
Last change:
Date: 7 years ago
Size: 603 bytes
 

Contents

Class file image Download
<?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
?>