J'ai un problème au niveau dans mon script

Fermé
samira222 Messages postés 6 Date d'inscription mercredi 18 mai 2016 Statut Membre Dernière intervention 25 juillet 2016 - 17 juil. 2016 à 13:12
NHenry Messages postés 15113 Date d'inscription vendredi 14 mars 2003 Statut Modérateur Dernière intervention 22 avril 2024 - 17 juil. 2016 à 14:36
svp si vous pouvez m aidez je voulais savoir l erreur dans mon script svp

<?php

class database
{
protected $connection = null;

#make a connection
public function __construct($db_host,$db_name,$db_user,$db_pass)
{
$db_host = "localhost";
$db_name = "gestioncarriere";
$db_user = "root";
$db_pass = "";

try{

$db_con = new PDO("mysql:host={$db_host};dbname={$db_name}",$db_user,$db_pass);
$db_con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $e){
echo $e->getMessage();
}
}
}
?>
A voir également:

1 réponse

NHenry Messages postés 15113 Date d'inscription vendredi 14 mars 2003 Statut Modérateur Dernière intervention 22 avril 2024 331
17 juil. 2016 à 14:36
Merci de décrire le problème.
0