Jump to content

Archived

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

the apprentice webmaster

can anyone help .....

Recommended Posts

guys i am trying to run this script but i am getting this mistake :

[b]Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\Program Files\xampp\htdocs\catalog\includes\functions\database.php on line 19
Unable to connect to database server![/b]

please anyone , tell me what is wrong there pls ,

Share this post


Link to post
Share on other sites
Can you give us the code that you are using to connect?

Thx.

[!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--][b]Jeremy[/b][!--colorc--][/span][!--/colorc--]

Share this post


Link to post
Share on other sites
[!--quoteo(post=367885:date=Apr 24 2006, 03:56 AM:name=jeremywesselman)--][div class=\'quotetop\']QUOTE(jeremywesselman @ Apr 24 2006, 03:56 AM) [snapback]367885[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Can you give us the code that you are using to connect?

Thx.

[!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--][b]Jeremy[/b][!--colorc--][/span][!--/colorc--]
[/quote]

here's the code
function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {
global $$link;

if (USE_PCONNECT == 'true') {
$$link = mysql_pconnect($server, $username , $password);
} else {
line 19--> $$link = mysql_connect($localhost, $lololo , $password);
}

if ($$link) mysql_select_db($database);

return $$link;
}

so help me guys thx

Share this post


Link to post
Share on other sites
Have you defined DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD and DB_DATABASE?

You need to tell PHP where the database is and how to connect to it.

Rob

Share this post


Link to post
Share on other sites

×

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.