$detail->hole11_hcp = (int) trim($_POST['hole11_hcp']);
 $detail->hole12_par = (int) trim($_POST['hole12_par']);
 $detail->hole12_hcp = (int) trim($_POST['hole12_hcp']);
 $detail->hole13_par = (int) trim($_POST['hole13_par']);
 $detail->hole13_hcp = (int) trim($_POST['hole13_hcp']);
 $detail->hole14_par = (int) trim($_POST['hole14_par']);
 $detail->hole14_hcp = (int) trim($_POST['hole14_hcp']);
 $detail->hole15_par = (int) trim($_POST['hole15_par']);
 $detail->hole15_hcp = (int) trim($_POST['hole15_hcp']);
 $detail->hole16_par = (int) trim($_POST['hole16_par']);
 $detail->hole16_hcp = (int) trim($_POST['hole16_hcp']);
 $detail->hole17_par = (int) trim($_POST['hole17_par']);
 $detail->hole17_hcp = (int) trim($_POST['hole17_hcp']);
 $detail->hole18_par = (int) trim($_POST['hole18_par']);
 $detail->hole18_hcp = (int) trim($_POST['hole18_hcp']);
 $course_fact->update_course_detail($detail);
 $showDetail = true;
 $id = trim($_REQUEST['id']);
 $course = $course_fact->get_course($id);
 $smarty->assign('editDetail', true);
 $smarty->assign('pathimage', $course->course_logopath);
 $smarty->assign('course_id', $course->course_id);
 $smarty->assign('course_name', $course->course_name);
 $smarty->assign('course_addr', $course->course_addr);
 $smarty->assign('course_phone', $course->course_phone);
 $smarty->assign('course_desc', $course->course_desc);
 $smarty->assign('savebtn', "Save course");
 $par = $course->get_detail();
 $hole = $par["hole"];
 $key = 1;
 $smarty->assign('cr_id', $par["course_id"]);