$_REQUEST['mode'] = 'e';
}
// if form was submitted:
if ($_POST['commit'] == "Cancel") {
    header("Location:testimonial_list.php");
    exit;
}
if ($_POST['commit'] == "Save Testimonial") {
    if ($id == 0) {
        // add the listing
        $objTestimonial = new Testimonial();
        $objTestimonial->CustomerName = $_REQUEST["customer_name"];
        $objTestimonial->CustomerTitle = $_REQUEST["customer_title"];
        $objTestimonial->CustomerCompany = $_REQUEST["customer_company"];
        $objTestimonial->TestimonialText = $_REQUEST["testimonial_text"];
        $objTestimonial->Create();
        // redirect to listing list
        header("Location:testimonial_list.php");
        exit;
    } else {
        $objTestimonial = new Testimonial($_REQUEST["id"]);
        $objTestimonial->CustomerName = $_REQUEST["customer_name"];
        $objTestimonial->CustomerTitle = $_REQUEST["customer_title"];
        $objTestimonial->CustomerCompany = $_REQUEST["customer_company"];
        $objTestimonial->TestimonialText = $_REQUEST["testimonial_text"];
        $objTestimonial->Update();
        // redirect to listing list
        header("Location:testimonial_list.php");
        exit;
    }
} else {