Welcome Guest, Not a member yet? Register   Sign In
Need help handling single quote and backslash for input text
#1

[eluser]agammill[/eluser]
I'm allowing people to use the single quote ' and the backslash \ however on the ajax call, those characters are causing my code to choke. My plan was to replace those characters with characters that don't mess it up.

Code:
$my_input = str_replace("'","`",$post["my_input"]);

Any ideas?
#2

[eluser]CroNiX[/eluser]
htmlentities()?




Theme © iAndrew 2016 - Forum software by © MyBB