创建一个简单的数据库PHP搜索引擎

I try to create a simple search engine on PHP, which connect to the database and search a string from a table attribute. And based on the keyword, the search results will display the table rows which have the same keyword string. I'm using PHP version 5.6.21

search.php


<html>
<body>
 <form action="" method="get"><center>
    Search: <input type="text" name="search" placeholder="Enter any keywords" /><br><br>
            <input type="submit" name="submit" value="Submit" />
            <center>
             </form>
             <hr>
<?php

$hostid= 'localhost';
$user='root';
$pass='';
$db= 'projectdata';
mysqli_connect($hostid, $user, $pass);
mysql_select_db($db);


 if(isset($_GET['submit'])){
     
                $search_value=$_GET['search'];
                $query="SELECT * FROM Book where title LIKE '%$search_value%'";
                
                $run=mysql_query($query);
                
                if($run===FALSE){
                    die(mysql_error());
                }
                while ($row=mysql_fetch_array($run))
                {
                    $book_id=$row['book_id'];
                    $title=$row['title'];
                    $date_purchased=$row['date_purchased'];
                    $loan_status=$row['loan_status'];
                    echo "<table><tr><th>Book ID</th><th>Title</th><th>Date Purchased</th><th>Loan Status</th>";
                    echo "<tr><td>$book_id</td><td>$title</td><td>$date_purchased</td><td>$loan_status</td></tr>";
                }
            }
?>
</body>
</html>

How ever, it didn't return anything and there is no errors. Below is projectdata.php


<?php


   $hostid= 'localhost';          
   $user='root';
   $pass='';
   $db= 'projectdata';
   $link = mysqli_connect($hostid, $user, $pass, $db);
   if (!$link) {
   die('Connect Error (' .mysqli_connect_errno(). ') '     .mysqli_connect_error());
   }
   echo 'Success... ' .mysqli_get_host_info($link). "
";

    $query8 = "CREATE TABLE Book(book_id int, title varchar(100), date_purchased     TIMESTAMP, loan_status varchar(10))";
   $query9 = "INSERT INTO Book VALUES(1023, 'The Prisoner of Zenda', '2008-7-04', 'Available'),
                                 (2311, 'Rupert of Hentzau','2001-7-10', 'Available'),
                                 (7854, 'Management of Information System', '2010-6-14', 'Available'),
                                 (4507, 'Introduction to C++', '2012-1-19', 'Available'),
                                 (5319, 'Computer Networking 13th Edition', '2013-5-29', 'Available'),
                                 (3076, 'Introduction to Web Programming', '2008-4-26', 'Available'),
                                 (6901, 'Foundation of Quantum Mechanics', '2008-7-04', 'Available')";


  if (mysqli_query($link,$query8) ===TRUE)
 {
   echo ("Table Book successfully created.<br>");
   }


  if (mysqli_query($link,$query9) ===TRUE)
 {
   echo ("Values have been inserted into Book.<br><br>");
   }

 mysqli_close($link);

?>
</div>