Created_Who; $Created_When_Host = $row->Created_When; } if($Created_Who_Host != "") { $Created_Who = $Created_Who_Host; $Created_When = $Created_When_Host; $Updated_When = $Current_Date; $Updated_Who = $log; $sqldelete1 = "DELETE FROM sptooltaxa WHERE ID_TaxonIdentified = '$CheckID'"; $resultdelete1 = mysqli_query($GLOBALS["___mysqli_ston"], $sqldelete1); $sqldelete2 = "DELETE FROM sptoolhighertaxon WHERE FK_TaxonIdentified = '$CheckID'"; $resultdelete2 = mysqli_query($GLOBALS["___mysqli_ston"], $sqldelete2); } if($Created_Who_Host == "") { $Created_Who = $log; $Created_When = $Current_Date; $Updated_When = ""; $Updated_Who = ""; } $NameAuthorYearHost = $formGenusHost; if($formSubgenusHost) { $NameAuthorYearHost .= " (".$formSubgenusHost.") "; } if($formSpecificEpithetHost) { $NameAuthorYearHost .= " ".$formSpecificEpithetHost; } if($formRankHost) { $NameAuthorYearHost .= " ".$formRankHost; } if($formInfraspecificEpithetHost) { $NameAuthorYearHost .= " ".$formInfraspecificEpithetHost; } if($formAuthorParenthHost) { $NameAuthorYearHost .= " (".$formAuthorHost; } if($formAuthorYearParenthHost) { $NameAuthorYearHost .= ", ".$formAuthorYearParenthHost; } if($formAuthorParenthHost) { $NameAuthorYearHost .= ")"; } if($formAuthorHost) { $NameAuthorYearHost .= " ".$formAuthorHost; } if($formAuthorYearHost) { $NameAuthorYearHost .= ", ".$formAuthorYearHost; } if($sql1 and $NameAuthorYearHost != "") { $sqlGenusHost = addslashes($formGenusHost); $sqlSubgenusHost = addslashes($formSubgenusHost); $sqlSpecificEpithetHost = addslashes($formSpecificEpithetHost); $sqlInfraspecificEpithetHost = addslashes($formInfraspecificEpithetHost); $sqlAuthorHost = addslashes($formAuthorHost); $sqlAuthorYearHost = addslashes($formAuthorYearHost); $sqlAuthorParenthHost = addslashes($formAuthorParenthHost); $sqlAuthorYearParenthHost = addslashes($formAuthorYearParenthHost); $sqlNameAuthorYearHost = addslashes($NameAuthorYearHost); $sqlIdentifierHost = addslashes($formIdentifierHost); $sqlIdentDateHost = addslashes($formIdentificationDateHost); $sqlIdentNotesHost = addslashes($formIdentNotesHost); $sqlHost = "INSERT INTO sptooltaxa (FK_Collection, Genus, Subgenus, SpecificEpithet, AuthorParenth, YearParenth, Author, Year, Rank, InfraspecificEpithet, NameAuthorYear, KindOfIdentification, Identifier, IdentificationDate, PreferredFlag, IdentificationNotes, Synecology, Created_Who, Created_When, Updated_Who, Updated_When)" . "VALUES ('$IDsptoolCollection','$sqlGenusHost','$sqlSubgenusHost','$sqlSpecificEpithetHost','$sqlAuthorParenthHost','$sqlAuthorYearParenthHost','$sqlAuthorHost','$sqlAuthorYearHost','$formRankHost','$sqlInfraspecificEpithetHost','$sqlNameAuthorYearHost','$formIdentTypeHost','$sqlIdentifierHost','$sqlIdentDateHost','$PreferredFlagHost','$sqlIdentNotesHost','host','$Created_Who','$Created_When','$Updated_Who','$Updated_When')"; $resultHost = mysqli_query($GLOBALS["___mysqli_ston"], $sqlHost); $IDsptoolTaxaHost = ((is_null($___mysqli_res = mysqli_insert_id($GLOBALS["___mysqli_ston"]))) ? false : $___mysqli_res); #######################################Error 9############################################################### if(!$resultHost) { $msg = $sqlHost."\n"; $msg .= "####Error Host####"; if($debug == '1') echo $msg; trigger_error($msg, E_USER_ERROR); include ("../config/Errorreport.php"); } ############################################################################################################# if($resultHost) { if($_POST['formHigherTaxonHost'] != "") { foreach($_POST['formHigherTaxonHost'] as $indexHost => $HigherTaxaFreeHost) { if(!empty($HigherTaxaFreeHost)) { $RankHost = $_POST['hiddenHigherTaxonHost'][$indexHost]; $sqlHost2 = "INSERT INTO sptoolhighertaxon (FK_TaxonIdentified, HigherTaxon, TaxonRank, Synecology, Created_Who, Created_When, Updated_Who, Updated_When) VALUES ('$IDsptoolTaxaHost','$HigherTaxaFreeHost','$RankHost','host','$Created_Who','$Created_When','$Updated_Who','$Updated_When')"; $resultHost2 = mysqli_query($GLOBALS["___mysqli_ston"], $sqlHost2); } } }} #######################################Error 10############################################################### if(!$resultHost2 and !$resultHost) { $msg = $sqlHost2."\n"; $msg .= "####Error Host2####"; if($debug == '1') echo $msg; trigger_error($msg, E_USER_ERROR); include ("../config/Errorreport.php"); } ############################################################################################################# } //if($sql8) /*------------------------ END Host IDENTIFICATION -------------------------------------------------*/ ?>