$id = $_REQUEST["id"];
    $_REQUEST['mode'] = 'e';
}
// if form was submitted:
if ($_POST['commit'] == "Cancel") {
    header("Location:expertisesolution_list.php");
    exit;
}
if ($_POST['commit'] == "Save Expertise Solution") {
    if ($id == 0) {
        // add the listing
        $objExpertiseSolution = new ExpertiseSolution();
        $objExpertiseSolution->SolutionName = $_REQUEST["solution_name"];
        $objExpertiseSolution->SolutionSubheading = $_REQUEST["solution_subheading"];
        $objExpertiseSolution->SolutionText = $_REQUEST["solution_text"];
        $objExpertiseSolution->Create();
        // redirect to listing list
        header("Location:expertisesolution_list.php");
        exit;
    } else {
        $objExpertiseSolution = new ExpertiseSolution($_REQUEST["id"]);
        $objExpertiseSolution->SolutionName = $_REQUEST["solution_name"];
        $objExpertiseSolution->SolutionSubheading = $_REQUEST["solution_subheading"];
        $objExpertiseSolution->SolutionText = $_REQUEST["solution_text"];
        $objExpertiseSolution->Update();
        // redirect to listing list
        header("Location:expertisesolution_list.php");
        exit;
    }
} else {
    if ($_REQUEST['mode'] == 'e') {