the apprentice webmaster Posted April 24, 2006 Share Posted April 24, 2006 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 19Unable to connect to database server![/b]please anyone , tell me what is wrong there pls , Link to comment https://forums.phpfreaks.com/topic/8238-can-anyone-help/ Share on other sites More sharing options...
jeremywesselman Posted April 24, 2006 Share Posted April 24, 2006 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--] Link to comment https://forums.phpfreaks.com/topic/8238-can-anyone-help/#findComment-30011 Share on other sites More sharing options...
the apprentice webmaster Posted April 24, 2006 Author Share Posted April 24, 2006 [!--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 Link to comment https://forums.phpfreaks.com/topic/8238-can-anyone-help/#findComment-30012 Share on other sites More sharing options...
Roberto Posted April 24, 2006 Share Posted April 24, 2006 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 Link to comment https://forums.phpfreaks.com/topic/8238-can-anyone-help/#findComment-30018 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.