Q:

How can I improve my query to search by characters instead of a string?

I have written a PHP function to perform suggestive searches. The function uses a query which does a search and match of the user input string then lists the suggested matches in a list. Everything thing works as intended at this point but im looking to improve it.
Below is my code :
function fillQueryData() {
    $dbName = $_SESSION ['dbN'];
    $link = mysqli_connect ( 'localhost', 'root', '', $dbName );
    if (! $link) {
        die ( "Connection failed" . mysqli_errno ( $link ) );
    }
    if (isset ( $_POST ['name'] )) {
        $name = trim ( $_POST ['name'] );
        $tblName = $_SESSION ['tblN'];
        $colqry = "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '$dbName' AND TABLE_NAME = '$tblName'";
        echo "<ul>";
        $col_names = mysqli_query ( $link, $colqry );
        while ( $col = mysqli_fetch_array ( $col_names, MYSQLI_ASSOC ) ) {
            $colName = $col ['COLUMN_NAME'];
            $tblQry = "SELECT * FROM $tblName WHERE $colName='$name'LIMIT 4";
            $query2 = mysqli_query ( $link, $tblQry );
            while ( $query3 = mysqli_fetch_array ( $query2 ) ) {
                ?>

<li onclick='fill( "<?php echo $query3 [$colName]; ?>") '><?php echo $query3 [$colName]; ?>   </li> 

My question is how can I improve my query so searches can be performed by characters of a string instead of using the full string only. For instance at the moment inorder to get a valid match I have to search for the full word. I would like to get suggestions when I'm typing letters of this said word etc.
The Query
"SELECT * FROM $tblName WHERE $colName='$name'"

A:

think it should be 
"SELECT * FROM $tblName WHERE $colName LIKE '$name%'"

but I wonder if that will perform sufficiently well. Unless the amount of data is prohibitive, it might be an idea to put all names into a JSON-Array and use them from there when the user types...

