thenewperson Posted December 6, 2009 Share Posted December 6, 2009 Whats the difference between these and whats better to use for registering and login systems mysql_real_escapse stripslashes addslashes Link to comment https://forums.phpfreaks.com/topic/184133-mysql_real_escape/ Share on other sites More sharing options...
waynew Posted December 6, 2009 Share Posted December 6, 2009 mysql_escape_string() is the older version of mysql_real_escape_string(). mysql_real_escape_string() is used to escape dangerous characters that may interfere with your SQL queries (for example, attackers could use SQL injection). stripslashes() strips slashes It's often used in conjunction with addslashes(). You addslashes(), then after taking data out of the database, you use stripslashes(). addslashes() escapes certain characters that might interfere with your SQL queries. However, it's kind of old school to use it in place of mysql_real_escape_string(). Use mysql_real_escape_string() instead. Link to comment https://forums.phpfreaks.com/topic/184133-mysql_real_escape/#findComment-972168 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.