Hello!
I'm new to ***** Hosting (just got everything set up a couple of days ago, in fact) and I was wondering if anyone here might be able to help me out.
I've some experience with Web design, but all of my database work has been with ASP. I'm learning a bit of how PHP works, but I keep having trouble accessing my database. I am told that, while I can connect to the server, it cannot find the database itself.
Here's what I've been using:
$dbh=@mysql_connect ("localhost", "db_user", "password") or die ('I cannot connect to the database because: ' . mysql_error());
if (!$dbh) {
echo( "<p>Unable to connect to the " .
"database server at this time.</p>" );
exit();
}
mysql_select_db("db_",$dbh);
if (!@mysql_select_db("db_") ) {
echo( "<p>Unable to locate the db " .
"database at this time.</p>" );
exit();
}
Sorry if this goes beyond the scope of support, but I just thought I'd see if anyone could see what I was doing wrong.
Many thanks!