download file on form submission I have created a form which has only a submit button. In the submit function I am generating csv file and saving it to the files folder using fputcsv function.

But Now I need extra functionality of submit. After saving the file it should download the file also.

How to do this? Any one have some idea about this?
Attach a form submit handler (code here: Drupal 7 custom form submit handler is not being called).

Then set the file url to $form_state['redirect'].

The file download should begin when submitted.