来自PHPmyadmin的Php结果

I have a table where I want to put my songs in. I don't get the result from the database, the database is connected doesn't say it is unable to connect

My page is also blank.

$db = mysqli_connect("$host:$port", $user, $pass) or die("null");
mysqli_select_db($db, $database) or die("Unable to select database");   
mysqli_query("SET NAMES utf8", $db); 
mysqli_query( "SET CHARACTER SET utf8", $db ); 

    $h.= "";
    $h.= "<form><table class='table table-striped table-hover'>";
    $h.= "  <tr>";
    $h.= "    <th>#</th>";
    $h.= "    <th>Home</th>";


    $h.= "    <th></th>";
    $h.= "  </tr>";

    $sql = mysqli_query("SELECT * FROM songs");
    $res = mysqli_result($sql);


for($i=0;$i<$res->num_rows);$i++){

    $h.= "    <td>".($res,$i,"id")."</td>";
    $h.= "    <td>".($res,$i,"song")."</td>";

}
$db = new mysqli($server, $username, $password, $database);