php新手的表单提交
本&文来源gaodai^.ma#com搞#代!码网
搞gaodaima代码问题
—————–demo.html—————-
<body>
——————search.php—————–
<?php
if(isset($_GET[‘submit’]))
{
header(“Location:http://www.baidu.com/s?wd=$_GET%5B‘search’%5D”);//百度搜索跳转
}
?>
出错提示:
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%5Bsearch%5D”);//百度搜索跳转