Home >Backend Development >PHP Tutorial >新人问一个php的问题

新人问一个php的问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 20:12:581002browse

三个页面 提交到同一个脚本
这三个页面都是回答问题的形式 每个页面有三个按钮 其中有一个是正确答案
请问怎么样在脚本里面分开接收每个页面提交过来的答案?

回复内容:

三个页面 提交到同一个脚本
这三个页面都是回答问题的形式 每个页面有三个按钮 其中有一个是正确答案
请问怎么样在脚本里面分开接收每个页面提交过来的答案?

简单,在那三个页面分别添加value="page1",value="page2",value="page3"。
php页添加
if($_GET["xx"]/$_POST["xx"]=="page1"){}
if($_GET["xx"]/$_POST["xx"]=="page2"){}
if($_GET["xx"]/$_POST["xx"]=="page3"){}

给后端提供两个参数就可以了呀,一个参数确定来自哪个页面,另一个参数提交答案。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:homebrew安装apache顺序?Next article:php大神解答下