$tee->hole04_length = $_POST["hole4"]; $tee->hole05_length = $_POST["hole5"]; $tee->hole06_length = $_POST["hole6"]; $tee->hole07_length = $_POST["hole7"]; $tee->hole08_length = $_POST["hole8"]; $tee->hole09_length = $_POST["hole9"]; $tee->hole10_length = $_POST["hole10"]; $tee->hole11_length = $_POST["hole11"]; $tee->hole12_length = $_POST["hole12"]; $tee->hole13_length = $_POST["hole13"]; $tee->hole14_length = $_POST["hole14"]; $tee->hole15_length = $_POST["hole15"]; $tee->hole16_length = $_POST["hole16"]; $tee->hole17_length = $_POST["hole17"]; $tee->hole18_length = $_POST["hole18"]; $course_fact->add_course_tee($tee); // Back to show 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;