This is what worked for me in the end. Its a small project so efficiency is not a big deal. Just wondering how it looks now.
I tried doing it the suggested way but I did not really understand it and as such I could not trouble shoot it when I could not get it working :P.
This I do understand.
if(!empty($_POST))
{
$project = $_POST['project'];
if ($project == "All") {
$project = '';
}
$category = $_POST['category'];
if ($category == "All") {
$category = '';
}
$services = $_POST['services'];
if ($services == "All") {
$services = '';
}
$priority = $_POST['priority'];
if ($priority == "All") {
$priority = '';
}
$query = $db->prepare
("SELECT * FROM event
WHERE Project LIKE '%$project%' AND
EventCategory LIKE '%$category%' AND
EventServices LIKE '%$services%' AND
EventPriority LIKE '%$priority%';");
$query->execute();
$result = $query;
$db= NULL;
}