I've got a form that gathers some data. The data is then modified and should be passed to the user as a file. To manage this I did the following:
header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Content-Type: text/out'); header('Content-Disposition: attachment; filename="file.out"'); echo $file; module_invoke_all('exit'); exit();
What I need now is to somehow display some additional info to the user without losing the input data. In other words, when user submits a form, it should let him download the file and then, for example, print out a success message, contents of the file downloaded or another form. Is there any way to do that?