Hi
I am having trouble connecting a php page to a database.
I have gone into cpanel and created a database:
current databases: dbprofil_
current users: dbprofil_dbprofi
**I have not added anything to 'Access Hosts' it just says 'local host'**
All i want to do is connect to the database using my php page:
$dbConn = mysql_connect ("localhost", "dbprofil_dbprofi", "*****") or die ('MySQL connect failed. ' . mysql_error());
mysql_select_db("dbprofil_") or die('Cannot select database. ' . mysql_error());
...but it wont connect i get the error:
Cannot select database. Access denied for user: 'dbprofil_dbprofi@localhost' to database 'dbprofil_'
My website is hosted by www.hostingdepartment.net
any help you could give me would be greatly appreciated.
many thanks
Bil
I am having trouble connecting a php page to a database.
I have gone into cpanel and created a database:
current databases: dbprofil_
current users: dbprofil_dbprofi
**I have not added anything to 'Access Hosts' it just says 'local host'**
All i want to do is connect to the database using my php page:
$dbConn = mysql_connect ("localhost", "dbprofil_dbprofi", "*****") or die ('MySQL connect failed. ' . mysql_error());
mysql_select_db("dbprofil_") or die('Cannot select database. ' . mysql_error());
...but it wont connect i get the error:
Cannot select database. Access denied for user: 'dbprofil_dbprofi@localhost' to database 'dbprofil_'
My website is hosted by www.hostingdepartment.net
any help you could give me would be greatly appreciated.
many thanks
Bil