My company uses an invoice software I've made. It's a simple page that copies input from fields, checkboxes and some dynamic table with Javascript into a new page with A4 CSS so it can be printed or sent via mail as PDF.
Now I have to start on the second feature: open an invoice. I have thought of one way I could make this.
When a new invoice is made and input is copied into the other page, to also copy all the HTML from the form in which all the inputs are into a text file with PHP - and later when a user "opens" an invoice, it just opens the file which just copies all the HTML code.
I don't know how to copy part of the code into a text file. If you also know an easier, better way please tell.