Reputation: 1527
i have a form field excepting text. i use ajax and php to save the text into mysql and post back the the submitted text on the page without a refresh.
Example: "Here's My Text Example"
The returned text to the page displays as "Here///'s My Text Example"
if i do a stripslashes($_POST['txt']) to display the text i still get this "Here/'s My Text Example"
How do i resolve this so all the /// come out of the returned text?
Upvotes: 0
Views: 439
Reputation: 615
Is magic quotes enabled? Try put this in your php code:
ini_set ('magic_quotes_gpc', 0);
Upvotes: 1