brophp中的form表单提交问题
在home/views/default3/public/header.tpl<formaction="<{$app}>/search"method="post"><inp...
在home/views/default3/public/header.tpl
<form action="<{$app}>/search" method="post">
<input name="words" type="input" value="请输入关键词">
<input name="submit" type="submit" value="搜索">
</form>
在zgcy\home\controls中
function search(){
P($_POST("words"));
$search = D("u_caipu");
//$words = $_POST["words"];
$data = $search
->field("title")
->where(array("title" => $_POST["words"]))
->select();
$this -> display();
}
可是表单内容提交不到function下,怎么回事? 展开
<form action="<{$app}>/search" method="post">
<input name="words" type="input" value="请输入关键词">
<input name="submit" type="submit" value="搜索">
</form>
在zgcy\home\controls中
function search(){
P($_POST("words"));
$search = D("u_caipu");
//$words = $_POST["words"];
$data = $search
->field("title")
->where(array("title" => $_POST["words"]))
->select();
$this -> display();
}
可是表单内容提交不到function下,怎么回事? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询