Hi,
If i look at the following code i can't understand the outcome:
class DBASE {
// var to hold the db-link-id
var $dbConnection
//constructor
function DBASE() {
//connecten to database
$this->myConnection = mysql_connect('dbserver','dbusername','dbpass') or die ("DB Connect failed");
//database selection
mysql_select_db('dbname', $this->myConnection) or die (mysql_error());
}
}
$myDB = new DBASE;
Now, the result is:
Access denied for user: '@dbserver to database 'dbname'
where i expected the message to be:
Access denied for user: 'dbuser@dbserver to database 'dbname'
or even the die() message at mysql_connect(): DB Connect failed
why is the username lost in this message???
Thanks for looking in to this...