Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user ''@'localhost' (using password: NO) in C:\EasyPHP-5.3.6.0\www\Database Manager\install\registration.php on line 14

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in C:\EasyPHP-5.3.6.0\www\Database Manager\install\registration.php on line 14

Fatal error: Call to a member function query() on a non-object in C:\EasyPHP-5.3.6.0\www\Database Manager\install\registration.php on line 16

Help ! when I use mysql_real_escape_string(), this error pops up.

    Springles;10976927 wrote:

    Help !

    you don't have a connection to the db, so mysql_real_escape_string wont work.

    Note:

    A MySQL connection is required before using mysql_real_escape_string() otherwise an error of level E_WARNING is generated, and FALSE is returned. If link_identifier isn't defined, the last MySQL connection is used.

      How can I initialize the MySQL conection ?

        In the login_details() method, why do you call mysql_query() with no parameters? That's going to do nothing but generate errors (and confusion, since it doesn't make any sense).

        As for connecting to your DB, your DBAL class provides a method for doing just that.

          Write a Reply...