fbpx

Search Display

[insert_php]
$type = $_POST[‘searchType’];
$searchBy = $_POST[‘searchBy’];
$query = “SELECT name, id, room
FROM `groups`
WHERE name LIKE ‘%” . $searchBy . “%'”;

$results = $GLOBALS[‘wpdb’]->get_results($query);

foreach ( $results as $group )
{
echo ‘ :