*/ // require all the files require_once 'Matchup.inc.php'; require_once 'session.php'; // create an instanceof MUTournaments $tournaments = new MUTournaments(); // get all the tournament user is not register $allTournaments = $tournaments->getTournamentsUserIsNotEnrolledIn($_SESSION["username"]); // check if the submit button is pressed if (isset($_POST["submit"])) { // get the tournament id $tournament_id = $_POST["tournament_id"]; // create an instanceof MURegistration $registration = new MURegistration(); // register the user to the tournament if ($registration->registerUserToTournament($_SESSION["username"], $tournament_id)) { // redirect the user to the tournament header("location: tournaments.php"); exit; } } ?> <!DOCTYPE html> <html> <head> <title>Iscriviti al torneo</title> <link rel="stylesheet" type="text/css" href="css/style.css" /> </head> <body> <div class="header"> <div class="content_left"><b>MatchUp</b></div>