Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function connect()
- {
- $this->dbServer = "localhost";
- $this->dbUsername = "testgebruiker";
- $this->dbPassword = "1234";
- $this->dbName = "userdeb";
- try
- {
- $connstring = "mysql:host=".$this->dbServer.";dbname=".$this->dbName."";
- $this->pdo = new PDO($connstring, $this->dbUsername, $this->dbPassword);
- $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- }
- catch(PDOException $e)
- {
- echo "ConnectionFailed: " . $e->getMessage();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement