public function update_crop() { $id = $_POST['id']; $common_name = $_POST['common-name']; $scientific_name = $_POST['scientific-name']; $harvest_time = $_POST['harvest-time']; $months = $_POST['months']; $details = $_POST['details']; Crop::update($id, $common_name, $scientific_name, $harvest_time, $months, $details); $crops = Crop::all(); require_once 'views/crops/admin.php'; }