Jump to content

database error


mananx

Recommended Posts

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in D:\Installed Programes\Apache\htdocs\vid\index.php on line 25

Error connecting

 

 

Line 25 says : $con=mysql_connect ($db_host,$db_user,$db_pass) or die("Error connecting");

 

These variables are being accessed from : require("http://localhost/vid/dbconfig.php");

 

It works when I replace database variables with values  , but I am unable to find out error source

 

can any one guide

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/147263-database-error/
Share on other sites

You are using a URL in your require() statement. That does NOT include that code in the file, it only includes any HTML content that the file outputs, the same as if you browsed to that file. You need to use a file system path in a require() statement in order to include the php code in the file.

Link to comment
https://forums.phpfreaks.com/topic/147263-database-error/#findComment-773067
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.