Jump to content

Help with MYSQL errors


asreall

Recommended Posts

Good morning, i have come on my hands a knees asking for help as i am at a great loss and have no hair left to pull. I read the guideline and hope i have followed them correctly, please tell me otherwise. many thanks in advance. 

 

 

mysql Server version: 5.0.95

 

 

 

$db_host = "192.168.1.1";  
$db_username = "useradmin";
$db_password = "admin101";
$db_name = "testproduct";
 
mysql_connect("$dbhost","$dbusername","$dbpassword") or die ("could not connect to mysql");
mysql_select("$dbname") or die ("no database");
 
 
(example information but have checked to make sure that it is correct )

 

i have uploaded the code above in a file called index.php to my server and when i try to load the page in the browser all i get returned is "could not connect to mysql" 

 

I have no idea as to why.

 

many thanks 

 

Asreall

Link to comment
https://forums.phpfreaks.com/topic/279858-help-with-mysql-errors/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.