php新手的表单提交有关问题

WBOY
Release: 2016-06-13 13:10:29
Original
696 people have browsed it

php新手的表单提交问题
-----------------demo.html----------------


百度 google









------------------search.php-----------------
if(isset($_GET['submit']))
{
header("Location:http://www.baidu.com/s?wd=$_GET['search']");//百度搜索跳转
}
?>

出错提示:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING 

先谢谢各位了。

------解决方案--------------------
header("Location:http://www.baidu.com/s?wd={$_GET['search']}");//百度搜索跳转

header("Location:http://www.baidu.com/s?wd=$_GET[search]");//百度搜索跳转
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template