Argh! I'm at my wit's end!
I have got a site from a host with PHP & 1 MySQL Database.
Site: www.lattyware.com
Host: www.zesthost.com
I worked out PHP and everything works well with that.
But now I am trying to use mySQL everything's gone wrong, basically I can't seem to do anything with it, I managed to get phpBB set up on it but I am tring to use it with PHP and create a user system.
Now, Here is my code - I have replaced the username & password for obvious reasons.
<?PHP
$my_connection = @mysql_connect('localhost', '[username]', '[password]');
if (!$my_connection) {
die('Could not connect to MySQL database server, the server returned the error: '.mysql_error());
}
$db = @mysql_select_db('lwdb');
if (!$db) {
die('Could not select MySQL database, the server returned the error: '.mysql_error());
}
?>
And that's my code, but All I get is this:
Could not connect to MySQL database server, the server returned the error: Access denied for user: '[username]@' (Using password: YES)
My acess details are definataly right. PHPbb works with them.
Please Help Me!