使用 PHP 基于 HTML Web 表单选择在 Unix Box 上创建 DOC 文件

发布于 2024-08-08 09:02:49 字数 203 浏览 1 评论 0原文

我有一个 HTML 文件,其中包含一个包含多个问题的网络表单,这些问题的答案是“是”/“否”。

如果问题的答案是“是”,我希望将预定义的(每个问题)文本部分写入服务器上的 DOC 文件,但只有在按下提交按钮之后(这样,如果用户改变主意并将答案从“是”更改为“否”,我不必重新编写文档)。

当用户单击“提交”时,该文件应以下载形式显示。

任何想法

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

送舟行 2024-08-15 09:02:49

你只需要像这样将你的html表单链接到一些脚本(php,jsp,...)然后

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

脚本完成整个工作...这里是php的一些示例:

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:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文