0){ $scan_request = new scan_request($num_request); switch($sub){ case 'upload': $scan_request->add_explnum(); break; case 'edit': print $scan_request->get_ajax_form(); break; case 'save': print $scan_request->save_ajax_form(); break; default: break; } }