rockinaway Posted April 6, 2008 Share Posted April 6, 2008 I have a login script, that work totally fine with normal characters of the alphabet. But when I start using " and ' in the usernames, the login doesn't work any more, despite the information being right. What should I do? I am using mysql_real_escape_string() on both when the username is first entered into the DB, and when the login takes place.. Link to comment https://forums.phpfreaks.com/topic/99868-mysqlphp-works-with-normal-characters/ Share on other sites More sharing options...
hitman6003 Posted April 6, 2008 Share Posted April 6, 2008 use stripslashes. When a POST var has quotes in it, single or double, depending on your php.ini settings, php will add a backslash before them. You can remove them using the stripslashes function. Echo out our username and password variables to see what php sees to verify. http://www.php.net/stripslashes Link to comment https://forums.phpfreaks.com/topic/99868-mysqlphp-works-with-normal-characters/#findComment-510741 Share on other sites More sharing options...
rockinaway Posted April 6, 2008 Author Share Posted April 6, 2008 Still doesn't work :S Eventhough the username and password now match to those in the database, but what else could be wrong? Link to comment https://forums.phpfreaks.com/topic/99868-mysqlphp-works-with-normal-characters/#findComment-510754 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.