基于HTML webform选择,使用PHP在Unix Box上创建一个DOC文件 [英] Use PHP to create a DOC file on a Unix Box based on an HTML webform selection

查看:134
本文介绍了基于HTML webform选择,使用PHP在Unix Box上创建一个DOC文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个HTML文件,其中包含一个带有多个问题的网络表单,其中包含YES / NO回复。如果问题有YES答案,我想预定义(每个问题)部分的文本要写入服务器上的DOC文件,但仅在按下提交按钮之后(这样,如果用户改变主意并将答案表单更改为NO,我就赢得'不必重新编写文档)。



当用户点击提交时,该文件应该以下载的形式呈现。



任何想法

解决方案

您只需将您的html表单链接到某个脚本(php,jsp, ..)like this

 < form action =/ myscript.phpmethod =post> 
您的表格
< input type =submitvalue =发送表格>
< / form>

然后脚本完成整个工作......以下是一些php的示例:




I have an HTML file which contains a webform with multiple questions which have a YES / NO responses.

If the question has a YES answer, I would like a predefined ( per question ) section of text to be written to a DOC file on the server, but only AFTER the submit button has been pressed ( this way, if the user changes their mind and changes an answer form YES to NO, I won't have to re-write the doc ).

When the user has clicked Submit, The file should be presented as a download.

Any Ideas

解决方案

you only have to link your html form to some script (php, jsp, ...) like this

<form action="/myscript.php" method="post">
   YOUR FORM
   <input type="submit" value="Send Form">
</form>

Then script does the whole work...here are some examples for php:

这篇关于基于HTML webform选择,使用PHP在Unix Box上创建一个DOC文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆