【发布时间】:2020-10-17 05:51:47
【问题描述】:
我的问题是我已经制作了六种不同的表单1.php、2.php、3.php、4.php、5.php 和 6.php,但我希望所有不同表单的结果都显示在一个摘要页面。
六种不同的表格将提供给六个不同的人,他们都有自己的页面,他们提交的文本将显示。
假设我告诉他们写他们最喜欢的食物,它会是这样的:
Person 1 types in the form at 1.php that sends it to 1food.php through $_POST
Person 2 types in the form at 2.php that sends it to 2food.php through $_POST
Person 3 types in the form at 3.php that sends it to 3food.php through $_POST
Person 4 types in the form at 4.php that sends it to 4food.php through $_POST
Person 5 types in the form at 1.php that sends it to 5food.php through $_POST
Person 6 types in the form at 1.php that sends it to 6food.php through $_POST
现在有六个不同的页面,包含六种不同的食物,问题是我希望这些永久保存在每个页面上,直到他们输入新的内容。另一个问题是我还想把所有六个页面的信息都拿到一个汇总页面。
摘要页面需要包含所有六个人永久写的食物,直到他们的表格获得新的输入。
新页面 summarizedfood.php 必须显示 1food.php、2food.php、3food.php、4food.php、5food.php 和 6food.php 的所有结果并保存.
summarizedfood.php 保存他们写的内容的原因是给任何人或任何地方提供一个类似https://examplelink.com/summarizedfood.php 的链接,它会显示他们回答的内容。
我在互联网上搜索了如何解决这个问题,但找不到任何帮助,这就是我在 stackoverflow 上注册自己的原因。
英语不是我的第一语言,所以请原谅语法错误。
请帮忙!
【问题讨论】:
-
是否正在使用一些数据库来控制这些食物的插入?像mariaDB或其他人一样。如果您不使用推荐将这些食物保存在 json 文件中,并且只使用一种形式来保存它们。
-
我对 MySQL 不太熟悉,但是在您写完这篇文章后,我已经在我的网络托管商的 phpMyAdmin 上添加了一个数据库,目前正在 YouTube 上观看如何管理数据库的不同教程。