I am using Jquerys ajax function to post data to my database. I have a textarea that allows users to type in their posts and update it to the database.
Here is a code snippet:
$.ajax({
type : "POST",
url: "process.php",
data: "postmessage="+ postmessage +"& from_user="+ from_user +"& from_username="+ from_username,
My problem is that when the data within the 'postmessage' variable contains character such as " and ' it fails to post. How can I turn filter these characters and put them back in on the other end????
Example text:
"I've been talking alot lately"