diff --git a/admin/data_management/add_tourney.php b/admin/data_management/add_tourney.php index 499fa4d..adb770b 100644 --- a/admin/data_management/add_tourney.php +++ b/admin/data_management/add_tourney.php @@ -119,6 +119,23 @@ echo "Successfully uploaded new tournament record"; + + // Function from StackOverflow used to get the base URL, to which we append + // the redirect (where the user came from) + function url(){ + return sprintf( + "%s://%s/tournament", + isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http', + $_SERVER['SERVER_NAME'] + ); + } + + $address = url(); + echo "
Redirecting to $address/$tourneyUID...
"; + + echo ""; + + } catch (PDOException $e) { // failed connection echo "Connection failed: " . $e->getMessage(); } diff --git a/admin/data_management/tourney_form.php b/admin/data_management/tourney_form.php index 209c87d..88cf71b 100644 --- a/admin/data_management/tourney_form.php +++ b/admin/data_management/tourney_form.php @@ -127,7 +127,7 @@ try { // Try opening the SQL database connectionWINNING TEAM NAME:
- +