Associate
- Joined
- 22 Aug 2011
- Posts
- 240
Hey guys, I'm getting problems within my login feature of my website that i'm currently in the process of creating.
Here is the problem that I am encountering at the moment:
I went into my PHP code and checked to see if there were any such problems and everything looks fine on my end, but here is the code for that also:
I have removed my personal information for security reasons, but can anyone help out with the problem here? I am confused a little.
I have even been back into my mysql settings on my control panel for my server, I use dreamhost btw and the username and password are correct, I even made a new user and tested it and it allowed me to log in to the database without any issues, so I'm just lost at the moment as to why it is being this difficult.
Here is the problem that I am encountering at the moment:
Warning: mysql_connect(): Access denied for user 'danclarke1'@'hostnamehere; (using password: YES) in E:\Program Files (x86)\EasyPHP-12.1\www\login\checklogin.php on line 9
cannot connect
I went into my PHP code and checked to see if there were any such problems and everything looks fine on my end, but here is the code for that also:
1 <?php
2 host="mysql.hostname.com"; // host name
3 $username="user1"; // username to log in
4 $password="testing"; // password to log in
5 $db_name="dancla"; // database name you are using for the log in
6 $tbl_name="members"; // table name you are using for the log in
7
8 // connect to the server and select the database
9 mysql_connect("$host", "$username", "$password")or die("cannot connect");
10 mysql_select_db("$db_name")or die("cannot select DB");
I have removed my personal information for security reasons, but can anyone help out with the problem here? I am confused a little.
I have even been back into my mysql settings on my control panel for my server, I use dreamhost btw and the username and password are correct, I even made a new user and tested it and it allowed me to log in to the database without any issues, so I'm just lost at the moment as to why it is being this difficult.