public function editSubmit() { if (isset($_POST['save']) || isset($_POST['launch'])) { $experiment = ExperimentUtilities::get_experiment(Input::get('expId')); // update local experiment variable $updatedExperiment = ExperimentUtilities::apply_changes_to_experiment($experiment, Input::all()); ExperimentUtilities::update_experiment($experiment->experimentId, $updatedExperiment); if (isset($_POST['save'])) { $experiment = ExperimentUtilities::get_experiment(Input::get('expId')); // update local experiment variable } if (isset($_POST['launch'])) { ExperimentUtilities::launch_experiment($experiment->experimentId); } return Redirect::to('experiment/summary?expId=' . $experiment->experimentId); } else { return View::make("home"); } }