zszucs Posted October 24, 2008 Share Posted October 24, 2008 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? Quote Link to comment https://forums.phpfreaks.com/topic/129954-validation-and-forced-load/ Share on other sites More sharing options...
PFMaBiSmAd Posted October 24, 2008 Share Posted October 24, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/129954-validation-and-forced-load/#findComment-673685 Share on other sites More sharing options...
zszucs Posted October 24, 2008 Author Share Posted October 24, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/129954-validation-and-forced-load/#findComment-673692 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.