Hello,
I am VERY new to PHP but I am trying to teach myself it so excuse me if I don't make sense. What I am trying to do at the moment, is to create a website with a log-on page, so to start out with, I setup WAMP on a Windows 7 machine, I have that up and going. So my next step was logging into phpMyAdmin and creating a new database named "diode" I then proceeded to go under privlages and then created a username and password with all privlages for that database yet my php code can't access it, so I have no clue what I am doing wrong. I will post my sql connection code below as well as the error message I am getting.
PHP Code
$connection = mysql_connect("127.0.0.1","username","password") OR die(mysql_error());
$db_select = mysql_select_db("diode",$connection) OR die(mysql_error());
Error Message
( ! ) Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Access denied for user 'username'@'localhost' (using password: YES) in C:\wamp\www\index.php on line 3
Call Stack
Time Memory Function Location
1 0.0019 684760 {main}( ) ..\index.php:0
2 0.0019 685048 mysql_connect ( ) ..\index.php:3
Access denied for user 'username'@'localhost' (using password: YES)
Any help at all would be greatly appreciated!