473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

convert page to PDF or .xls or .doc and email as attachment

I have a report.php page that displays data from a mysql database.

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.

God bless
jason
Nov 15 '07 #1
1 1532

"jsd219" <in**@musiclanerecording.comwrote in message
news:e2**********************************@o6g2000h sd.googlegroups.com...
>I have a report.php page that displays data from a mysql database.

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.
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
content-type.
God bless
allah? mythra, zeus, jesus? too many to be meaningful...but i appreciate
your kindness. :)
Nov 16 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Wald | last post by:
Hello group, I've got a script here that sends emails with an attachment to an email address that is retrieved from an html form. The email sending code is include below. The problem: when...
1
by: abracad | last post by:
I'd like to add a form that will email a file attachment to me. Can anyone recommend a decent free script? Thanks
2
by: Tiro Orsa | last post by:
Hey all... GOAL: My end goal is to send a web page (single file) as an attachment (not embedded) via email to any of the main email clients (Eudora, Outlook, etc). Users see a single web page...
9
by: NickH | last post by:
Hi, Thanks in advance for any help you can provide. I have a frameset and one of the frames contains a page that is created on the fly, an actual word document. I want to have a button in one of...
7
by: TLMM | last post by:
I have an HTML page which is a newsletter. I want to be able to add it to an email message so I can email it to people. I want it to be in the body of the email, not sent as an attachment. There...
5
by: Music Lover | last post by:
Is it possible to do the following? inside a ASP NET application, 1) send the current web page to the acrobat distiller printer. 2) attach the PDF file into an email message 3) send teh message...
33
by: STILL LEARNING | last post by:
I'm not sure if this can even be done, but what prompts the question is my desire to be able to create an "Uber Link" script/code of some sort, such that even if the html page contains nothing but...
7
by: erikcw | last post by:
Hi all, I'm trying to extract zip file (containing an xml file) from an email so I can process it. But I'm running up against some brick walls. I've been googling and reading all afternoon, and...
3
by: jambonjamasb | last post by:
Hi I have two tables: email_tbl Data_table Data table is is used to create a Form Data_form
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.