Answers for "how to use search box to access mysql database"

PHP
0

search function using php for database entries

$result = mysqli_query($con, "SELECT * FROM employees
    WHERE first_name LIKE '%{$name}%' OR last_name LIKE '%{$name}%'");

while ($row = mysqli_fetch_array($result))
{
        echo $row['first_name'] . " " . $row['last_name'];
        echo "<br>";
}
    mysqli_close($con);
    ?>
Posted by: Guest on October-22-2020

Code answers related to "how to use search box to access mysql database"

Browse Popular Code Answers by Language