$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 { if ($_REQUEST['mode'] == 'e') { //listing $objTestimonial = new Testimonial($id); $customer_name = $objTestimonial->CustomerName; $customer_title = $objTestimonial->CustomerTitle; $customer_company = $objTestimonial->CustomerCompany; $testimonial_text = $objTestimonial->TestimonialText; } } include "includes/pagetemplate.php";