PHP Connection Error
I am experimenting with PHP and MySQL and I have this code:
class DbConnector {
/*
* Values are private, accessed by functions, more secure
*/
private $dbHost;
private $dbUser;
private $dbPass;
private $dbName;
private $connection;
function __construct() {
$dbHost = 'localhost';
$dbName = 'gallery_photos';
$dbUser = 'guest_gallery';
$dbPass = 'password';
}
public function setUserCredentials($dbUser, $dbPass) {
this.$dbUser = $DbUser;
this.$dbPass = $DbPass;
}
public function connect() {
$connection = mysql_connect(localhost,$dbUser,$dbPass);
//mysql_select_db($dbName);
}
public function disconnect() {
mysql_close();
}
}
but attempts to connect produce this error:
Access denied for user 'ODBC'@'localhost
Can anyone help please? I'm very confised
Subject
Written By
Posted
PHP Connection Error
May 11, 2005 09:46AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.