Question: I need to create a PDF or Word file filled with contents from my database. Then the customer need to download that file. All this should happend when customer click on link.

Anyone have any idea?

Answer: 
I have used [TCPDF](http://www.tcpdf.org/) with much success to generate PDF files programatically using PHP.

And to generate word documents: <http://www.phpdocx.com/> (this is a paid solution).
Try TCPDF

<http://www.tcpdf.org/>

But google could have told you that