addslashes – PHP Reference Book Blog https://phpreferencebook.com/ PHP Reference: Beginner to Intermediate PHP5 Sun, 01 Oct 2017 17:21:19 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.13 mysql_real_escape_string() vs addslashes() https://phpreferencebook.com/clarifications/mysql_real_escape_string-vs-addslashes/ Wed, 30 Apr 2008 05:24:08 +0000 https://phpreferencebook.com/?p=10 Continue reading mysql_real_escape_string() vs addslashes()]]> (pgs. 124-125)

When describing the function mysql_real_escape_string(), the following note was included:

Note: Performs the same functionality as addslashes().

While they are practically identical in their behavior, this is an oversimplification of the extra strength of mysql_real_escape_string(). At this point, I will pass on the following blog post that provides some extra insight into the comparison of the two variables:addslashes() Versus mysql_real_escape_string() by Chris Shiflett. I was not previously aware of this difference and security loophole.

]]>