</form> <!--a href="#" onclick="subForm1('addReg')">Register</a--> </div> <?php if (isset($_POST['addReg'])) { $tourId = ""; if (isset($_POST['sTournament'])) { $tourId = $_POST['sTournament']; } $registration = new RegistrationVO(); $registration->set_tournamentId($tourId); $registration->set_teamId($teamId); $regResult = ""; $regResult = $regDao->cudRegistration($registration, CREATE); if ($regResult == 1) { echo 'Tournament registered successfully'; } else { echo $regResult; } } //end of if(isset($_POST['addReg']) unset($_POST['addReg']); ?> <table> <thead>