if(!isset($_POST['search'])||trim($_POST['search'])==''){ $_POST['search']=''; } $find = $_POST['search']; $result=mysql_query("select * from job where title like '%".$inputkey."%'"); while($myrow=mysql_fetch_array($result)){ ?>
取值查询也有问题 $inputkey = isset($_POST['inputkey ']) ? $_POST['inputkey '] : ''; $result=mysql_query("select * from job where title like '%".$inputkey."%'");
谢谢各位,问题解决了,最后代码是这样的 include("inc/conn.php"); ?>
测试
职位
公司
人数
专业
// if(!isset($_POST['search'])||trim($_POST['search'])==''){ // $_POST['search']=''; // } // $find = $_POST['search']; $inputkey = isset($_POST['inputkey']) ? $_POST['inputkey'] : ''; $result=mysql_query("select * from job where title like '%".$inputkey."%'"); while($myrow=mysql_fetch_array($result)){ ?>