tags:

views:

31

answers:

3

Hi guys,

I am posting data to a php file via jQuery's $.post method, but for some reason the string comes out escaped on the other side, like so,

Sent: company_name="company"

Received: company_name=\"company\"

Any idea what could be the cause?

Thanx in advance!

A: 

sounds like you have magic_quotes enabled on your server - and, as you see, you should realy disable that to avoid confusing stuff like that (see: why not to use magic quotes). (also, this "feature" will be deleted in the future, so you shouldnt rely on that)

oezi
+1  A: 

You most likely have ugly magic quotes turned on. You should disable them just in case. See how to disable them here:

http://www.php.net/manual/en/security.magicquotes.disabling.php

Sarfraz
A: 

You probably have magic_quotes_gpc on. Turn them off, or, if you can't, use stripslashes to remove them.

lonesomeday