if(isset($_REQUEST['checkAjax']) && $_REQUEST['checkAjax'] == '1' && isset($_REQUEST['txt_nif_cif'])){ $handlers = ob_list_handlers(); while (count($handlers) > 0 && $handlers[count($handlers) - 1] != 'ob_gzhandler' && $handlers[count($handlers) - 1] != 'zlib output compression') { ob_end_clean(); $handlers = ob_list_handlers(); } header("Content-Type: application/json"); $records = array(); $db = JFactory::getDbo(); $db->setQuery("Select * From #__facileforms_elements Where form = " . $db->quote(intval($_REQUEST['ff_form']))); $rows = $db->loadObjectList(); $cnt = count($rows); for($i = 0; $i < $cnt; $i++) { $db->setQuery("Select * From #__facileforms_subrecords Where name = 'txt_nif_cif' And value = " . $db->quote($_REQUEST['txt_nif_cif'])); $sub = $db->loadObject(); if($sub) { { echo 'true'; continue; } } } }