3

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!

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.