mysql_real_escape_string() ... Password NO Error

benphoto

New Member
Messages
5
Reaction score
0
Points
0
I keep recieving this error with my scripting, I'm very new with this scripting.

Error I'm recieving....

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'bensbox'@'lotus.x10hosting.com' (using password: NO) in /home/bensbox/public_html/socialnetwork_root_directory/register.php on line 72

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/bensbox/public_html/socialnetwork_root_directory/register.php on line 72

Warning: mysql_query() [function.mysql-query]: Access denied for user 'bensbox'@'lotus.x10hosting.com' (using password: NO) in /home/bensbox/public_html/socialnetwork_root_directory/register.php on line 75


(there is about 20 of these)

The script that is related to these errors...

// Connect to database
include_once "scripts/connect_to_mysql.php";
$emailCHecker = mysql_real_escape_string($email1);
$emailCHecker = eregi_replace("`", "", $emailCHecker);
// Database duplicate e-mail check setup for use below in the error handling if else conditionals
$sql_email_check = mysql_query("SELECT email FROM myMembers WHERE email='$emailCHecker'");
$email_check = mysql_num_rows($sql_email_check);


The mysql_connect.php is fine and connect, so I have no idea what is going on.

Any help would be greatful, thanks.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
benphoto said:
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'bensbox'@'lotus.x10hosting.com' (using password: NO) in /home/bensbox/public_html/socialnetwork_root_directory/register.php on line 72

.....

The mysql_connect.php is fine and connect, so I have no idea what is going on.
.

mysql_real_escape_string():

the last link opened by mysql_connect() is assumed. If no such link is found, it will try to create one as if mysql_connect() was called with no arguments. If no connection is found or established, an E_WARNING level error is generated.

Well, the error message seems to be saying that your mysql_connect.php did not make a connection.

You can try adding the second arguement for mysql_real_escape_string(), the resource that mysql_connect returns and see what happens.
 
Last edited:
Top