Removing quotes and slashes from POST data
String = Don't tread on "me!"
Result = Don't tread on me!
***
How come this isn't catching the single quote?
Just changed the replace method - thanks:
$account['MESSAGE'] = stripslashes($_POST['MESSAGE']);
$search = array("\"","\'");
$replace = array("", "");
$account['MESSAGE'] = str_replace($search, $replace, $account['MESSAGE']);
Result = Don't tread on me!
***
How come this isn't catching the single quote?
Just changed the replace method - thanks:
$account['MESSAGE'] = str_replace('"',"",$account['MESSAGE']);
$account['MESSAGE'] = str_replace("'","",$account['MESSAGE']);
