+ Reply to Thread
Results 1 to 2 of 2

Thread: mysql_real_escape_string() ... Password NO Error

  1. #1
    benphoto is offline x10Hosting Member benphoto is an unknown quantity at this point
    Join Date
    Aug 2008
    Posts
    5

    mysql_real_escape_string() ... Password NO Error

    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.

  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: mysql_real_escape_string() ... Password NO Error

    Quote Originally Posted by benphoto

    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 by descalzo; 10-13-2009 at 11:43 AM.
    Nothing is always absolutely so.

+ Reply to Thread

Similar Threads

  1. It works! ...
    By bpakidz in forum Programming Help
    Replies: 4
    Last Post: 09-07-2008, 11:12 PM
  2. 500 Internal Server Error
    By thefox91 in forum Free Hosting
    Replies: 12
    Last Post: 12-06-2007, 03:57 PM
  3. Error en mi host
    By roonline in forum Soporte
    Replies: 17
    Last Post: 11-14-2007, 03:28 PM
  4. 500 Internal Server Error (PHP Error?)
    By aniklaus in forum Free Hosting
    Replies: 3
    Last Post: 11-12-2007, 11:47 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers