case 'FAILED':
    case 'UNKNOWN':
        $editable = true;
        break;
    default:
        $editable = false;
        break;
}
if (isset($_POST['save']) || isset($_POST['launch'])) {
    $updatedExperiment = apply_changes_to_experiment($experiment);
    update_experiment($experiment->experimentID, $updatedExperiment);
    if (isset($_POST['save'])) {
        $experiment = get_experiment($_GET['expId']);
        // update local experiment variable
    } elseif (isset($_POST['launch'])) {
        launch_experiment($experiment->experimentID);
    }
}
//$transport->close();
?>


<h1>Edit Experiment</h1>




<form action="<?php 
echo $_SERVER['PHP_SELF'] . '?expId=' . $_GET['expId'];
?>
" method="post" role="form" enctype="multipart/form-data">
<?php 
create_nav_bar();
?>

<div class="container" style="max-width: 750px;">
    
<h1>Create a new experiment</h1>




<?php 
if (isset($_POST['save']) || isset($_POST['launch'])) {
    $expId = create_experiment();
    if (isset($_POST['launch']) && $expId) {
        launch_experiment($expId);
    } else {
        print_success_message("<p>Experiment {$_POST['experiment-name']} created!</p>" . '<p>You will be redirected to the summary page shortly, or you can
            <a href="experiment_summary.php?expId=' . $expId . '">go directly</a> to experiment summary page.</p>');
        redirect('experiment_summary.php?expId=' . $expId);
    }
}
//$transport->close();
?>



<form action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" method="post" role="form" enctype="multipart/form-data">