Jump to content

secure function - mysql_real_escape_string


Dat

Recommended Posts

Hey I have this form and I run it through a secure function:

 

function isSecure($string)
{
$string = strip_tags($string);
$string = htmlspecialchars($string);
$string = trim($string);
$string = stripslashes($string);
$string = mysql_real_escape_string($string);
return $string;
}

 

But I can't figure out why this happens when I submit something like this into my profile edit form:

 

now it works here @#$%^&*()

Why does this\' happen but this doesn\'t:
"HERE"

 

As you can see it add's slashes to the ' but not to the ". I want to remove those \.

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.