Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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);
    ?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #search #function #php #database #entries
ADD COMMENT
Topic
Name
7+8 =