tolearn Posted September 1, 2006 Share Posted September 1, 2006 Hi,Im trying to connect to database using php.But whenever i execuete the file its showing an error"Could not connect: Access denied for user: 'ODBC@127.0.0.1' (Using password: NO) error in php"What should i do? Quote Link to comment https://forums.phpfreaks.com/topic/19325-problem-in-connecting-to-database/ Share on other sites More sharing options...
redcore Posted September 14, 2006 Share Posted September 14, 2006 Did you forget your connection entries?If there was a previous connection on the page, did you close that and then forget to reconnect?[code]mysql_connect("localhost", "$username", "password") or die(mysql_error()); mysql_select_db("$database") or die(mysql_error());[/code] Quote Link to comment https://forums.phpfreaks.com/topic/19325-problem-in-connecting-to-database/#findComment-91486 Share on other sites More sharing options...
Zane Posted September 14, 2006 Share Posted September 14, 2006 This post belongs in the MSSQL Help Forum not in DreamweaverMoving.... Quote Link to comment https://forums.phpfreaks.com/topic/19325-problem-in-connecting-to-database/#findComment-91516 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.