04-15-2009, 11:06 PM
|
#1 (permalink)
|
|
The Acquainted
Join Date: Sep 2007
Posts: 126
Thanks: 4
|
What am I doing wrong here?
PHP Code:
public function __construct() {
$this->dbError = '';
$this->link = null;
}
public function dbConnect( $config['host'], $config['user'], $config['pswd'], $config['name'] ) {
$this->link = mysqli_connect($config['host'], $config['user'], $config['pswd'], $config['name']);
if(mysqli_connect_errno($this->link)) {
$this->dbError = mysqli_connect_error($this->link);
return false;
} else {
return true;
}
}
This line:
PHP Code:
public function dbConnect( $config['host'], $config['user'], $config['pswd'], $config['name'] ) {
gives me the following error:
Quote:
|
Parse error: syntax error, unexpected '[', expecting ')'
|
What am I doing wrong? :(
|
|
|
|