如何修复Parse错误:PHP中的语法错误?

时间:2019-02-19 03:38:27

标签: php mysql searchbar

我正在创建一个搜索栏,但是每当我运行代码时,它就会出现: 解析错误:语法错误,第26行的C:\ xampp \ htdocs \ Php \ result.php中文件意外结束

<?php
  mysql_select_db("shikin");
  //search code
  //error_reporting(0);
  if($_REQUEST['submit']){
  $name = $_POST['name'];
   if(empty($name)){
$make = '<h4>You must type something to search!</h4>';
     }else{
$make = '<h4>No match found!</h4>';
$sele = "SELECT * FROM data WHERE name LIKE '%$name%'";
$result = mysql_query($sele);

if($mak = mysql_num_rows($result) > 0){
    while($row = mysql_fetch_assoc($result)){
    echo '<h4> Id                       : 
       '.$row['id'];
    echo '<br> name                     : 
      '.$row['name'];
    echo '</h4>';
}
       }else{
          echo'<h2> Search Result</h2>';
        print ($make);
       }
   mysql_free_result($result);
    }
   ?>

0 个答案:

没有答案