Query(" SELECT Id, rubric_title FROM " . PREFIX . "_rubrics "); echo ""; while($result = $sql->FetchRow()){ echo ""; }; } if (isset($_POST['a'])) { global $AVE_DB; $sql = $AVE_DB->Query(" SELECT Id, document_alias, document_title, document_published, document_meta_description FROM " . PREFIX . "_documents WHERE rubric_id = '" . $_POST['b'] . "' AND Id !=1 && Id != '".PAGE_NOT_FOUND_ID."' "); $u_sel_doc = array(); while ($row = $sql->FetchAssocArray()) { array_push($u_sel_doc, $row); } foreach ( $u_sel_doc as $k=>$v ) { echo "