Current Path : C:/xampp/htdocs/todolist/class/ |
Current File : C:/xampp/htdocs/todolist/class/config.php |
<?php class config{ private $user= 'root'; private $password= ''; public $pdo = null; public function con(){ try { $this->pdo = new PDO('mysql:host=localhost;dbname=todoapp',$this->user, $this->password); } catch (PDOException $e) { die ($e->getMessage()); } return $this->pdo; } } ?>