Reputation: 107
I have a form which submits to a external url and the url returns a xml result whether the action did go well or not. I want the form to be posted and the xml result to returned so the user can see the xml result instead of the external url being opened in blank window without any formatting.
I'm not sure how to make this.
Upvotes: 0
Views: 205
Reputation: 270607
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:
$_POST
<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.
Upvotes: 1