//delete images is checked if (isset($dqty)) { $rou->setValue('commitid', $commitid); $rou->setValue('lotno', $lotno); $rou->setValue('dcdatedb', $dcdate); $rou->setValue('dcno', $dcno); $rou->setValue('dqty', $dqty); $rou->setValue('dremarks', $dremarks); if (isset($rcdid)) { $rou->setValue('rcdid', $rcdid); } else { $rou->setValue('rcdid', ''); } $rou->saveRoutecardDispatch(); } else { $rou->saveRoutecard(); //else it is not dispatch so save route card $routecardid = $rou->getValue('routecardid'); } if ($draw != '') { $rou->delImages($draw); } ///del images from server and db if ($_FILES['image']['size'] > 0) { ///put all files held in $_FILE[mfile] in to a new array $new_arr $params['upload_path'] = 'routecardimages/'; $params['max_file_size'] = 3000000; $params['linkid'] = $routecardid; $params['tablename'] = 'RC_Image'; $params['allowed'] = array('image/jpg', 'image/gif', 'image/png', 'image/jpeg', 'application/pdf'); $do_upload = '';