Hallo.
Ook dit heb ik aangepast, het script ziet er nu als volgt uit:
PHP
<?php
error_reporting(E_ALL);
class Connection {
public $connection;
public $query;
public $host;
public $user;
public $pass;
public $database;
public function __construct($host, $user, $pass, $database){
$this->host = $host;
$this->user = $user;
$this->pass = $pass;
$this->database = $database;
try {
$this->connection = new PDO("mysql:host=". $this->host .";dbname=". $this->database ."", $this->user, $this->pass);
$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch (PDOException $e) {
return $e->getMessage();
die();
}
}
}
?>
Toon Meer
Met vriendelijke groet,
Frank sijbom