CI 多表单提交通不过解决思路

WBOY
Release: 2016-06-13 11:55:50
Original
927 people have browsed it

CI 多表单提交通不过
大师们帮看看这段哪错了
if (!empty($_POST['num']) ||
!empty($_POST['title']) ||
!empty($_POST['price']) ||
!empty($_POST['years']) ||
!empty($_POST['season']) ||
!empty($_POST['groups'])
{

$w = array(
foreach($_POST as $k=>$v):
  if(!empty($v)){ 
$k => $v;
}
endforeach;
)
}
就是通不过
------解决方案--------------------
这是什么写法,数组里面foreach ? 能行吗? 
------解决方案--------------------
这写法闻所未闻啊
------解决方案--------------------
为什么要多表单,一个表单里,多个搜索条件不行吗???


------解决方案--------------------

$w = array();<br />if($_POST) {<br />  $w = array_diff($_POST, array('', 0));<br />}<br />//分页参数,路由配合<br />.....
Copy after login

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