getFromDB($_POST['value']); if ($_POST["type"]) { switch ($_POST['type']) { case Ticket::INCIDENT_TYPE : $opt['condition']['is_incident'] = '1'; if ($currentcateg->getField('is_incident') == 1) { $opt['value'] = $_POST['value']; } break; case Ticket::DEMAND_TYPE: $opt['condition']['is_request'] = '1'; if ($currentcateg->getField('is_request') == 1) { $opt['value'] = $_POST['value']; } break; } } ITILCategory::dropdown($opt);