$HigherTaxaFree2) { if(!empty($HigherTaxaFree2)) { $Rank2 = $_POST['hiddenHigherTaxon2'][$index2]; $sql5 = "INSERT INTO sptoolhighertaxon (FK_TaxonIdentified, HigherTaxon, TaxonRank, Created_Who) " . "VALUES ('$IDsptoolTaxa2','$HigherTaxaFree2','$Rank2','$log')"; $result5 = mysqli_query($GLOBALS["___mysqli_ston"], $sql5); #######################################Error 5############################################################### if(!$result5) { $msg = $sql5."\n"; $msg .= "####Error 5####";# if($debug == '1') echo $msg; trigger_error($msg, E_USER_ERROR); include ("../config/Errorreport.php"); $delete1 = mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM sptoolcollection WHERE ID_Collection = '$IDsptoolCollection'"); $delete2 = mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM sptooltaxa WHERE FK_Collection = '$IDsptoolCollection'"); $ERROR_Event = true;} ############################################################################################################# } } } //if($result4) }//if(!empty($Add1) /*-- Add further identifications No.2 ----------------# # # # # # # #-----------------------------------------------------*/ if(!empty($Add2)) { $NameAuthorYear3 = $formGenus3; if($formSubgenus3) { $NameAuthorYear3 .= " (".$formSubgenus3.") "; } if($formSpecificEpithet3) { $NameAuthorYear3 .= " ".$formSpecificEpithet3; } if($formRank3) { $NameAuthorYear3 .= " ".$formRank3; } if($formInfraspecificEpithet3) { $NameAuthorYear3 .= " ".$formInfraspecificEpithet3; } if($formAuthorParenth3) { $NameAuthorYear3 .= " (".$formAuthorParenth3; } if($formAuthorYearParenth3) { $NameAuthorYear3 .= ", ".$formAuthorYearParenth3; } if($formAuthorParenth3) { $NameAuthorYear3 .= ")"; } if($formAuthor3) { $NameAuthorYear3 .= " ".$formAuthor3; } if($formAuthorYear3) { $NameAuthorYear3 .= ", ".$formAuthorYear3; } if($result1) { $sqlGenus3 = addslashes($formGenus3); $sqlSubgenus3 = addslashes($formSubgenus3); $sqlSpecificEpithet3 = addslashes($formSpecificEpithet3); $sqlInfraspecificEpithet3 = addslashes($formInfraspecificEpithet3); $sqlAuthor3 = addslashes($formAuthor3); $sqlAuthorYear3 = addslashes($formAuthorYear3); $sqlAuthorParenth3 = addslashes($formAuthorParenth3); $sqlAuthorYearParenth3 = addslashes($formAuthorYearParenth3); $sqlNameAuthorYear3 = addslashes($NameAuthorYear3); $sqlIdentifier3 = addslashes($formIdentifier3); $sqlIdentDate3 = addslashes($formIdentificationDate3); $sqlIdentNotes3 = addslashes($formIdentNotes3); $sql6 = "INSERT INTO sptooltaxa (FK_Collection, Genus, Subgenus, SpecificEpithet, AuthorParenth, YearParenth, Author, Year, Rank, InfraspecificEpithet, NameAuthorYear, KindOfIdentification, Identifier, IdentificationDate, PreferredFlag, IdentificationNotes, Created_Who)" . "VALUES ('$IDsptoolCollection','$sqlGenus3','$sqlSubgenus3','$sqlSpecificEpithet3','$sqlAuthorParenth3','$sqlAuthorYearParenth3','$sqlAuthor3','$sqlAuthorYear3','$formRank3','$sqlInfraspecificEpithet3','$sqlNameAuthorYear3','$formIdentType3','$sqlIdentifier3','$sqlIdentDate3','$PreferredFlag3','$sqlIdentNotes3','$log')"; $result6 = mysqli_query($GLOBALS["___mysqli_ston"], $sql6); $IDsptoolTaxa3 = ((is_null($___mysqli_res = mysqli_insert_id($GLOBALS["___mysqli_ston"]))) ? false : $___mysqli_res); } #######################################Error 6############################################################### if(!$result6) { $msg = $sql6."\n"; $msg .= "####Error 6####"; if($debug == '1') echo $msg; trigger_error($msg, E_USER_ERROR); include ("../config/Errorreport.php"); $delete = mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM sptoolcollection WHERE ID_Collection = '$IDsptoolCollection'"); $ERROR_Event = true;} ############################################################################################################# if($result6) { foreach($_POST['formHigherTaxon3'] as $index2 => $HigherTaxaFree3) { if(!empty($HigherTaxaFree3)) { $Rank3 = $_POST['hiddenHigherTaxon3'][$index2]; $sql8 = "INSERT INTO sptoolhighertaxon (FK_TaxonIdentified, HigherTaxon, TaxonRank, Created_Who) " . "VALUES ('$IDsptoolTaxa3','$HigherTaxaFree3','$Rank3','$log')"; $result8 = mysqli_query($GLOBALS["___mysqli_ston"], $sql8); #######################################Error 8############################################################### if(!$result8) { $msg = $sql8."\n"; $msg .= "####Error 8####"; if($debug == '1') echo $msg; trigger_error($msg, E_USER_ERROR); include ("../config/Errorreport.php"); $delete1 = mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM sptoolcollection WHERE ID_Collection = '$IDsptoolCollection'"); $delete2 = mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM sptooltaxa WHERE FK_Collection = '$IDsptoolCollection'"); $ERROR_Event = true; } ############################################################################################################# } } }//if(!empty($Add2) /*-- Add further identifications No.3 ----------------# # # # # # # #-----------------------------------------------------*/ if(!empty($Add3)) { $NameAuthorYear4 = $formGenus4; if($formSubgenus4) { $NameAuthorYear4 .= " (".$formSubgenus4.") "; } if($formSpecificEpithet4) { $NameAuthorYear4 .= " ".$formSpecificEpithet4; } if($formRank4) { $NameAuthorYear4 .= " ".$formRank4; } if($formInfraspecificEpithet4) { $NameAuthorYear4 .= " ".$formInfraspecificEpithet4; } if($formAuthorParenth4) { $NameAuthorYear4 .= " (".$formAuthorParenth4; } if($formAuthorYearParenth4) { $NameAuthorYear4 .= ", ".$formAuthorYearParenth4; } if($formAuthorParenth4) { $NameAuthorYear4 .= ")"; } if($formAuthor4) { $NameAuthorYear4 .= " ".$formAuthor4; } if($formAuthorYear4) { $NameAuthorYear4 .= ", ".$formAuthorYear4; } if($result1) { $sqlGenus4 = addslashes($formGenus4); $sqlSubgenus4 = addslashes($formSubgenus4); $sqlSpecificEpithet4 = addslashes($formSpecificEpithet4); $sqlInfraspecificEpithet4 = addslashes($formInfraspecificEpithet4); $sqlAuthor4 = addslashes($formAuthor4); $sqlAuthorYear4 = addslashes($formAuthorYear4); $sqlAuthorParenth4 = addslashes($formAuthorParenth4); $sqlAuthorYearParenth4 = addslashes($formAuthorYearParenth4); $sqlNameAuthorYear4 = addslashes($NameAuthorYear4); $sqlIdentifier4 = addslashes($formIdentifier4); $sqlIdentDate4 = addslashes($formIdentificationDate4); $sqlIdentNotes4 = addslashes($formIdentNotes4); $sql9 = "INSERT INTO sptooltaxa (FK_Collection, Genus, Subgenus, SpecificEpithet, AuthorParenth, YearParenth, Author, Year, Rank, InfraspecificEpithet, NameAuthorYear, KindOfIdentification, Identifier, IdentificationDate, PreferredFlag, IdentificationNotes, Created_Who)" . "VALUES ('$IDsptoolCollection','$sqlGenus4','$sqlSubgenus4','$sqlSpecificEpithet4','$sqlAuthorParenth4','$sqlAuthorYearParenth4','$sqlAuthor4','$sqlAuthorYear4','$formRank4','$sqlInfraspecificEpithet4','$sqlNameAuthorYear4','$formIdentType4','$sqlIdentifier4','$sqlIdentDate4','$PreferredFlag4','$sqlIdentNotes4','$log')"; $result9 = mysqli_query($GLOBALS["___mysqli_ston"], $sql9); $IDsptoolTaxa4 = ((is_null($___mysqli_res = mysqli_insert_id($GLOBALS["___mysqli_ston"]))) ? false : $___mysqli_res); } #######################################Error 9############################################################### if(!$result9) { $msg = $sql9."\n"; $msg .= "####Error 9####"; if($debug == '1') echo $msg; trigger_error($msg, E_USER_ERROR); include ("../config/Errorreport.php"); $delete = mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM sptoolcollection WHERE ID_Collection = '$IDsptoolCollection'"); } ############################################################################################################# if($result9) { foreach($_POST['formHigherTaxon4'] as $index2 => $HigherTaxaFree4) { if(!empty($HigherTaxaFree4)) { $Rank4 = $_POST['hiddenHigherTaxon4'][$index2]; $sql10 = "INSERT INTO sptoolhighertaxon (FK_TaxonIdentified, HigherTaxon, TaxonRank, Created_Who) " . "VALUES ('$IDsptoolTaxa4','$HigherTaxaFree4','$Rank4','$log')"; $result10 = mysqli_query($GLOBALS["___mysqli_ston"], $sql10); #######################################Error 10############################################################### if(!$result10) { $msg = $sql10."\n"; $msg .= "####Error 10####"; if($debug == '1') echo $msg; trigger_error($msg, E_USER_ERROR); include ("../config/Errorreport.php"); $delete1 = mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM sptoolcollection WHERE ID_Collection = '$IDsptoolCollection'"); $delete2 = mysqli_query($GLOBALS["___mysqli_ston"], "DELETE FROM sptooltaxa WHERE FK_Collection = '$IDsptoolCollection'"); $ERROR_Event = true; } ############################################################################################################# } } } //if($result8) }//if(!empty($Add3) } /*------------------------ END FURTHER IDENTIFICATIONS -------------------------------------------------*/ ?>