handle = function() { global $myUser, $contest; DB::query("replace into contests_registrants (username, contest_id, has_participated) values ('{$myUser['username']}', {$contest['id']}, 0)"); updateContestPlayerNum($contest); }; $register_form->submit_button_config['class_str'] = 'btn btn-primary'; $register_form->submit_button_config['text'] = '报名比赛'; $register_form->succ_href = "/contests"; $register_form->runAtServer(); ?>