mysql_select_db not working with php page

tmv105

New Member
Messages
4
Reaction score
0
Points
0
I keep getting the error that "No database selected". I have a "Connections" file that contains this:
Code:
<?php
$hostname_diehl = "localhost";
$database_diehl = "tmv105_*****";
$username_diehl = "tmv105_*****l";
$password_diehl = "********";
$diehl = mysql_connect($hostname_diehl, $username_diehl, $password_diehl) or trigger_error(mysql_error(),E_USER_ERROR); 
?>
....and then my PHP page using these variables has this code:

Code:
mysql_select_db($database_diehl, $diehl);
And a page that is all but blank with the error "No database selected" appears. I have tried hard coding the database information into the statement and still no luck. Please help!
 
Last edited:

tmv105

New Member
Messages
4
Reaction score
0
Points
0
Duh! Thanks....it is not clear that after you create the user that they are not actually added to database. My user appeared to be there, but indeed under the username I needed to click the "add" button to administer privileges. Thanks again!
 

zapzack

New Member
Messages
606
Reaction score
19
Points
0
No problem.. This happened to me years ago when I started my own website.. Heh
 
Last edited:
Top