// All the others $tmpsearch = new Search; $tmpsearch->searchTerm = sanitize($_REQUEST['search'], 3); $search = $tmpsearch->get_search_clause(); // The link_status to search if(!empty($_REQUEST['status'])) { $status = $_REQUEST['status']; } elseif(!empty($_REQUEST['tag'])){ $tmpsearch->isTag = true; $status = 'published'; } else { // By default it searches on all if($search) $status = 'published'; else $status = 'published'; }