Here user can order their items and after confirmation of order they can download invoice file. After a quick Google I know about fpdf .but my question is how to create unique users invoice pdf through fpdf and php?
This is my cart page. When user click confirm oder they redirect into success page where they can download their invoice
[It is success page][2]error in generate unique user pdf code Part -1code part 2code part 3
Firstly I would suggest to use TCPDF
You can do following steps to generate pdf:
Gather all the data in session.
After confirming order get all the data from the session and use that data in generating pdf file
Use following link to get the example how to generate pdf. TCPDF Examples It will help you to code for generating pdf.
For unique user pdf generation you can rename the file name with user_id + timestamp