print ("<BR><BR><BR>Weather<br><br>"); var_dump($Weather, null); print ("<BR><BR><BR>Location<br><br>"); var_dump($Location, null); print ("<BR><BR><BR>php_errormsg is: <br>"); print ("<br><br>" . $php_errormsg . "<br>"); */ // IF no error was found, save the data if (!isset($php_errormsg)) { if ($weatherCount > 0) { $WeatherID = $Weather->SaveWeatherData(); $Plant->setPlantWeather($WeatherID); } else { $Plant->setPlantWeather(null); } if ($LocationCount > 0) { $LocationID = $Location->SaveLocation(); $Plant->setPlantLocation($LocationID); } else { $Plant->setPlantLocation(null); } $PlantManager = new PlantManager(); $PlantID = $PlantManager->savePlant($Plant); } // Reset the values that should not be re-used if another plant is entered by the user. // URW I am leaving the rest of the data, for convinience to allow the user to entered multiple plants // which were likely observed at the same time in the same place.