Jump to content

Archived

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

tolearn

Problem in connecting to Database

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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]

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.