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) Link to comment https://forums.phpfreaks.com/topic/68915-solved-mysql-escape-string-permissions-problem/ 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. Link to comment https://forums.phpfreaks.com/topic/68915-solved-mysql-escape-string-permissions-problem/#findComment-346391 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. Link to comment https://forums.phpfreaks.com/topic/68915-solved-mysql-escape-string-permissions-problem/#findComment-346392 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. Link to comment https://forums.phpfreaks.com/topic/68915-solved-mysql-escape-string-permissions-problem/#findComment-346398 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.