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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.