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
Share on other sites

action="https://www.site.com/process.icp"

 

I thought it was being processed externally?

 

1. Send the form to be processed

2. Retrieve the results from the external site where the form was processed

3. Display the results locally (origin of where the form was sent)

Link to comment
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.