搜索引擎使用网址

I started making site for songs. It is lyrics site and I wanted a search engine that works something like picture below.

It should works with URL.

Like this

<form action="#" method="POST">
  <input type="text" name="search"/>
  <input type="submit" name="submit" value="Submit">
</form>
<?php
 require "connection-to.php";
  $notFound = "";
  $song = "";
  if(isset($_POST['submit'])){
  $search = mysqli_real_escape_string($conn, $_POST['search']);
  $search = strtolower($search);
  $sql = "SELECT * FROM `music` WHERE `name` = '" . $search . "'";
  $query = mysqli_query($conn, $sql);
  $numRows = mysqli_num_rows($query);
  if($numRows != 0){
    while($row = mysqli_fetch_array($query)){
    echo $row['lyrics'] . "<br><br><br>";
}
} else {
    echo $search . " Was Not Found.";
}
}
?>

You don't want send a POST request. Change

<form action="#" method="POST">

to

<form action="" method="GET">

Then you can retrive it with $_GET['search'] instead of $_POST['search'].