Jump to content

Mysql_real_escape


thenewperson

Recommended Posts

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

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.