<?php
$output = ' ';
if (isset($_POST['search'])) {
$searchkey = $_POST['search'];
$searchkey = preg_replace ("#[^0-9a-z]#i","" , $searchkey);
$q = mysql_query("SELECT * FROM notices WHERE `organization` LIKE '%$searchq%' OR `location` LIKE '%searchq%'");
$count = mysql_num_rows($q);
}
if ($count == 0) {
$output = 'There was no search results!';
}else{
while ($row = mysql_fectch_array (q)) {
$organization = $row['organization'];
$location = $row['location'];
$output .= '<div> '.$location.' '.$organiztion.' <div>';
}
}
?>