Tournaments-adding-form now redirects to that tournament's info page after submission
Changed max length of winning team name to 30 characters
This commit is contained in:
parent
133bb19911
commit
66fdaf8ebd
@ -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 "<p>Redirecting to <a href=\"$address/$tourneyUID\">$address/$tourneyUID</a>...</p>";
|
||||
|
||||
echo "<script>window.top.location.href = \"" . $address . "/" . $tourneyUID . "\";</script>";
|
||||
|
||||
|
||||
} catch (PDOException $e) { // failed connection
|
||||
echo "Connection failed: " . $e->getMessage();
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ try { // Try opening the SQL database connection
|
||||
<p class="newLine"></p>
|
||||
<div id="playerDataInputArea">
|
||||
<p id="teamNameHeader">WINNING TEAM NAME:</p>
|
||||
<input type="text" name="winningTeamName" class="teamInput" maxlength="35" tabindex="1">
|
||||
<input type="text" name="winningTeamName" class="teamInput" maxlength="30" tabindex="1">
|
||||
<h4>Roster</h4>
|
||||
<table id="playerData">
|
||||
</table>
|
||||
|
Loading…
x
Reference in New Issue
Block a user