Jump to content

validation and forced load


zszucs

Recommended Posts

I'd like to see if there's a better way of doing this.

Right now, i have a form that has some selection criteria and posts to it itself to validate.  If it's good, a link to a forced download that consists of an xls file that has the processed details is presented.  what i would like is to have it post to itself, validate and just force the download if it's good data all there on the same form.  The problem seems to be that there can't be code above the header calls that force the download or the data will just be sent to the browser thus ruining the download.  Is there any way around this to acheive what I'm looking for which is a little more user friendly?

Link to comment
Share on other sites

As long as no content or other headers are output to the browser by the code, you can output the download headers and the file content on the same page.

this is a full html/php page so there's content there. by the sounds of it i can't do it.  i tried to redirect to the download and then back to the form but when it comes back to the form, that page never finishes rendering

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.