Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App;
- use PDO;
- use PDOException;
- class Connection{
- protected $conn;
- private $user ='root';
- private $pass='';
- public function __construct()
- {
- try {
- $this->conn=new PDO('mysql:host=localhost;dbname=crud67,$this->.user,$this->pass');
- }
- catch(PDOException $e){
- print "Error" . $e->getMessage() ."</br>;
- die();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement