There is no way that I am aware to just stop/pause what type of document
you are printing (which if you are embedding, then you have already
started a document of type text/html) and put another document type.

However, there are two types of solutions for this one:

If what you are displaying are images from a database, then you could use
the IMG tag of html with a SRC attribute of something like
"mypage.php?ImgID=239" and then from that PHP page do your image pull from
the database, respond with a header of "image/jpeg" or whatever for that
type of image and then the binary contents.

If, from you message, you are really displaying things like Word/Excel,
PDF, etc. you will need to create an IFRAME or LAYER tag to get another
page onto a page with the page location being "mypage.php?DocID=####" and
then responding with the appropriate header and then outputting the binary
contents.

For either solution, the easiest way is to say to yourself, "How would I
get the particular document type from the filesystem into this HTML page?"
and then just do that, but replace the part where you specify the
filesystem document with your SECOND php page that returns the document
from the database.

"William Cheung" <[EMAIL PROTECTED]> wrote in message
001001c2bb2b$dd7b0510$[EMAIL PROTECTED]">news:001001c2bb2b$dd7b0510$[EMAIL PROTECTED]...
I have stored Word, Excel and PDF documents in a database. Now I am trying
to retrieve the documents from the database using PHP and embed them onto an
html web page. I don't want to use hyperlink. The documents will be
displayed on the web page along with other information. When I use header()
function to specify the type of document I want to display in PHP. I got the
error saying that I can't change the header information on a web page. I
tried to set the second parameter of header() to True/False but none help.
What could I do?

William Cheung, B.Sc. MCSE MCDBA
Databyte Corp.


-- 
Stephen Cuppett, CEO
WebMasters, Inc.
http://www.webmastersinc.org
[EMAIL PROTECTED]
(814) 571-4987



-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to