ncw
asked on
Encode and post xml in a hidden form field
I'm posting cxml via http in a hidden form field. Before posting I'm encoding the cxml in php using utf8_encode and urlencode as shown below. The problem seems to be that the encoding replaces spaces in the tags with a plus sign(+) and when the receiving software tries to decode it fails, and I believe it's because of these plus signs in the tags.
Any ideas please? I don't want to use curl function btw.
Any ideas please? I don't want to use curl function btw.
urlencode(utf8_encode($cxml))
ASKER
Do I need to be using urlencode, does the browser automatically apply encoding during the form submission?
I don't sure about this, but better to use urlencode when there is a chance to escaping.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window