Jump to content

Download XML Report


dfowler

Recommended Posts

Hey guys, I have a tough one here.  Or at least I haven't been able to figure it out yet.  I have created a form that sends data to be processed by an outside vendor.  When you submit the form you are sent to their site to view the results in XML.  What I am wanting to do, if it is possible, is create some sort of script (which I know nothing about) that will send the form data, be processed, and download the XML report locally then display the information all on the users server.

 

So when the user clicks submit they stay on their server and view the XML report.  Here is my code:

<form enctype="multipart/form-data" method="post" action="https://www.site.com/process.icp">
		Login: <input type="text" name="login"  /><br /><br />
		Pass: <input type="password" name="pass"  /><br /><br />
		Number: <input type="text" name="num" /><br /><br />
		Number 2: <input type="text" name="num2" /><br /><br />
		<input type="submit" name="submit" value="Get Report" />
	</form>

 

I'm guessing instead of the form action going to there server I go to another page on my server.  Then on that page the script would send it and download the report and display it?  Thanks for any help!

Link to comment
https://forums.phpfreaks.com/topic/90964-download-xml-report/
Share on other sites

I'll run through it again.  When you fill out the form it goes to their site and displays the XML.  I'm hoping to avoid that.  Instead of:

<form enctype="multipart/form-data" method="post" action="https://www.site.com/process.icp">
		Login: <input type="text" name="login"  /><br /><br />
		Pass: <input type="password" name="pass"  /><br /><br />
		Number: <input type="text" name="num" /><br /><br />
		Number 2: <input type="text" name="num2" /><br /><br />
		<input type="submit" name="submit" value="Get Report" />
	</form>

 

I want to do this:

<form enctype="multipart/form-data" method="post" action="page2.php">
		Login: <input type="text" name="login"  /><br /><br />
		Pass: <input type="password" name="pass"  /><br /><br />
		Number: <input type="text" name="num" /><br /><br />
		Number 2: <input type="text" name="num2" /><br /><br />
		<input type="submit" name="submit" value="Get Report" />
	</form>

 

Then on page 2 display the XML results.

Link to comment
https://forums.phpfreaks.com/topic/90964-download-xml-report/#findComment-466215
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.