Hope someone can help me! I have a PHP 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="#" 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, phone 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!
If the values in the xml will be the values you are POSTing, then when you submit, you could take all the POST values and create an XML string from that and send it to the other server. Look at generating XML.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With