I have a database containing pages for an ebook. I need a script written that will automatically create the ebook and save it as a downloadable file on the server.
Pages: page_id, page_name, page_content, date_added, last_modified
The export should first create a Table of contents using the page_name field and be sorted alphabetically
The export should then create the pages for the ebook using page_name and page_content
The Table of contents should link directly to the page within the ebook
I have found a class that works, but need it modified to import data from my database. The class is attached below.