Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help: Selections in HTML form to wite .doc

Status
Not open for further replies.

Smoothas

IS-IT--Management
May 1, 2002
93
GB
Hello,

I'me trying to find out if its possable for a webpages form ( consising of YES and NO options ) to construct a Word Document for download based on the users selections.

I've already had help in contruction something similar ( creating a xml file via PHP code, and a page that displays "Tips" in a DIV defined box someehere else on the screen.

What, I think, I'm after is a combination of the 2.
I already have the webform up and working, but when, say, the user says YES to the question "Do you a business ?", i would like the code to "write" a paragraph of predefined text to a .doc file. If they answer YES to a second question, then that paragraph needs to be written.
The document would need to be create at the end of answering all he questions correct, otherwise i'm in the possition of trying to remove paragaphs.

This file then needs to be made accessable for the user to download.

Any ideas on how I can do this ?

Thanks
 
Using PHP you could create a txt file or even a Rich text file, but creating an actual office DOC file is going to be a little harder.

But you can try using the fopen, fread, fwrite command sin PHP to write to a file. Once the file is written, yo can show a link to it for download.

forum434


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top