php mysqli获取空白页面

时间:2017-01-24 17:31:42

标签: php database mysqli

以下是代码         

//**database connection**//

    include 'include/connect.php';

    mysqli_select_db("search_db") or die("Couldn't select database.");

     $output = '';
    //collect

    if(isset($_POST['search']) && $_POST['search'] != "")  
    {$searchq=$_POST['search'];
    $searchq = preg_replace("#[^0-9a-z]#i","",$searchq);
    $query =' mysqli_query("SELECT * FROM people WHERE name LIKE '%".
    $searchq . "%' OR id LIKE '" . $searchq . "';");      
     $count =mysqli_num_rows($query);
    if($count == 0) {

    $output = 'There was no search results!';
       } 
        else {
    while ($row = mysqli_fetch_array($query)) {
    $fname = $row ['name'];
    $id = $row ['id'];
    $output .= '<div>'.$name.' '.$id.'</div>';?>

    }
  }
    ?> 
                      <!---code End--->

当我执行此操作时,在脚本中获取银行页面的任何问题?任何帮助表示感谢您的问候

0 个答案:

没有答案