Home  >  Article  >  Backend Development  >  php同一页面内提交表单的问题

php同一页面内提交表单的问题

WBOY
WBOYOriginal
2016-06-23 13:59:431095browse

尝试做了一个页面 test.php  ,需要 get 方式提交表单后,由自身接收
代码

<html><body><!--  静态的表单在页面再次提交之后, 不再显示   同时页面的CSS失效--><form  id="pick" target="_blank" action="test.php" method="get">	<input name="con" type="text" id="search">	</input>	<input type="submit" value="search" id="btn"></input></form><?php         $input_content = $_GET['con'];     echo $input_content;?><body><html>


初学php 求解。。。 为什么静态的无法显示了?


回复讨论(解决方案)

<html><body><!--  静态的表单在页面再次提交之后, 不再显示   同时页面的CSS失效--><form  id="pick" action="test.php" method="post">	<input name="con" type="text" id="search">	</input>	<input type="submit" value="search" id="btn"></input></form><?php     $input_content = $_POST['con'];     echo $input_content;?><body><html>

测试没问题 不知道你那报的什么错误?可以把NOTICE等低级别的错误给屏蔽掉

是我自己二了,跳转页面写错了。。

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