Instead of posting the form directly to the external script, you will need to wrap it in your own PHP code to be able to deliver the XML back to your user to view.
To do this, you can:
- Make the form post to itself instead of directly to the external resource
- Capture the
$_POST
- Transfer it to a cURL request that posts to the external form
- Retrieve the output from the cURL request and display it for your user, wrapped in
<pre></pre> to preserve XML formatting.
Note however, that some web browsers will correctly display the returned XML as it already is, provided it is correctly identified as XML by the server sending it. You don't have control over that on either the external server or your end user clients though.