I have a script which all data from my partners I get prints to a screen (I wrote so) (check it: [url]25h.lt/acc.php[/url])..but now I need write a script (I think few lines in this acc.php file) which will let me download a CSV file..

I am not proffesional PHP programer and I never wrote a script which make a file..

Thanks for an answer but I get two warnings:Warning: Cannot modify header information - headers already sent by (output started at /home/hltb/domains/25h.lt/public_html/acc.php:4) in /home/hltb/domains/25h.lt/public_html/acc.php on line 17

-""- line 18

I think this is couse I already sent headers to print on a screen.. am I right?

If browser supports file format, it would try to open that file in browser window.'Force download' means that file won't be opened in browser window in any case, but instead it will be downloaded.

According to above, your use of term 'force download' is weird. There is nothing smarter to think of.I guess you wanted to say, that file is downloaded automatically (without Open/Save/Cancel dialog window). If that's the case, automatic download is set by browser and not a code.

P.S. Why have you posted a header problem when I answered you via PM? As you asked.