Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
November 15, 2007, 9:51 pm
rate this thread
I would like to create a text box to input an email address and upon
submitting, have the report attached and sent to the email specified.
The page can be converted to PDF or .xls or .doc whichever is easier.
Does anyone know how to do this? first and foremost, convert the page
to a PDF or .xls or .doc and second set up the form to attached the
newly created file and send it to the address specified.
Re: convert page to PDF or .xls or .doc and email as attachment
for excel, it's fairly easy (depending on the complexity of your output). if
you provide a callback function to ob_start(), you can build your normal
html - preferably a table. when the output buffer is ready to send the data
(to the browser for instance) it will give your function the content that's
about to be sent. at that point, you can just set the header() to the right
content-type. as for emailing that...just set the appropriate mime-type
content-type and put it in its correct boundry in the email.
for pdf, i use fpdf and build the output as i go. the same thing applies for
emailing...put it in the correct boundry and give it the correct
allah? mythra, zeus, jesus? too many to be meaningful...but i appreciate
your kindness. :)