lmcsheff Posted June 1, 2011 Share Posted June 1, 2011 Hi all, Hope someone can help me! I have a form which is posting data to another server - however, I need to post a hidden field of parameters, but as an XML string - E.g.: <form action="http://post it here" method="post"> <input type=”hidden” name=”values” value="{XML-formatted string}" /> </form> The XML values will be most of the form fields I'm collecting, such as name, address, email, telpetone etc. etc. Has anyone done this and importantly have an example of the code to achieve this? - its basically how to format and post the form values as the required XML string in order for the remote server to accept! Many thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/238101-php-form-to-post-hidden-field-parameters-in-xml-format/ Share on other sites More sharing options...
xyph Posted June 1, 2011 Share Posted June 1, 2011 use htmlentities($xmlstr); And it really depends on how the server expects these variables. It's VERY odd for a script to accept an XML-formatted string through POST data. Quote Link to comment https://forums.phpfreaks.com/topic/238101-php-form-to-post-hidden-field-parameters-in-xml-format/#findComment-1223573 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.