Asperon Posted September 11, 2007 Share Posted September 11, 2007 I am using mysql_real_escape_string() for my $_POST variables but I get this error Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'themiss2'@'localhost' (using password: NO) in /home/themiss2/public_html/writing/account_process.php on line 5 I'm not sure how to fix it. ps. this is all based out of cPanel and phpMyAdmin for web and database organization (if that helps withthe problem) Quote Link to comment Share on other sites More sharing options...
corbin Posted September 11, 2007 Share Posted September 11, 2007 Are you establishing a mysql connection previous the use of mysql_real_escape_string? If you aren't, it will try to establish a conn based on the defaults set in php.ini, and most of the time, that won't work out well. Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 11, 2007 Share Posted September 11, 2007 You have to be connected to the database to use that function. Post your connection code. Quote Link to comment Share on other sites More sharing options...
Asperon Posted September 11, 2007 Author Share Posted September 11, 2007 thank you, I was not connected to my database prior to calling the functions, it all works now, thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.