...

View Full Version : URL Encoding



binaryWeapon
11-10-2007, 02:33 PM
Okay, I'm trying to pass some actual XML codes from javascript to PHP with the $_get superglobal, and then PHP writes it to an XML file. It writes everything, but puts backslashes (\) before all the quotes, even when I "URL-encode" them. Any ideas? :confused:

Inigoesdr
11-10-2007, 03:09 PM
You probably have magic_quotes on. Try putting this at the top of your script:

if(get_magic_quotes_gpc())
$xmldata = stripslashes($_GET['xmldata']);
else
$xmldata = $_GET['xmldata'];
Change the name of the field to the one you use of course, and change the file data variable to $xmldata.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum