Jump to content

MySQL/PHP works with normal characters


rockinaway

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.