473,788 Members | 2,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1546

"jsd219" <in**@musiclane recording.comwr ote in message
news:e2******** *************** ***********@o6g 2000hsd.googleg roups.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...bu t 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
26788
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 sending the email to certain email servers, the attachment section of the email gets removed and I end up with an attachment of zero kb. Other servers do accept the attachment as expected.
1
3525
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
13980
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 attachment and either double click or "view in browser" in order to view it. (It is an attachment after all).... When they DO open Internet Explorer (is all I need, not netscape), a single image appears with some appended text.
9
1664
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 the other frames that emails this created page as an email attachment using the email client (outlook or whatever). I created a function as follows: <script language="JavaScript"> function mailIt()
7
7128
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 is a .htm page, several images, and a .css page. I need all of these to be embedded for the page to work correctly. I can put the styles from the ..css file into the html page, but I still need to know how to embed the images. I tried creating...
5
2205
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 by email Many thanks for any insight
33
2394
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 a background image -or- a background color -- in other words, the page has neither content nor placed images -- any click, ANYWHERE, will launch the URL in your browser. I realize I can make traditional text links and graphics links; what I'm...
7
7647
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 can't seem to figure it out. Here is what I have so far. p = POP3("mail.server.com")
3
3013
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
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10118
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8995
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7519
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2897
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.