</table> </form> <?php if (isset($_SESSION['TournamentId'])) { echo "<a href='group.php'>Gruppen konfigurieren</a><br />"; } // Gruppen konfigurieren if (!isset($tournament)) { include 'class_tournament.php'; $tournament = new Tournament(); } //Array ( [_Id] => 22 [name] => Tackmanncup [rounds] => 3 [link] => http://www.tackmanncup.de [logoPath] => [begin] => 2016-01-02 00:00:00 [end] => 2016-01-03 00:00:00 ) //Array ( [0] => Array ( [_Id] => 23 [name] => Tackmanncup [rounds] => 3 [link] => http://www.tackmanncup.de [logoPath] => [begin] => 2017-01-07 00:00:00 [end] => 2017-01-08 00:00:00 ) [1] => Array ( [_Id] => 22 [name] => Tackmanncup [rounds] => 3 [link] => http://www.tackmanncup.de [logoPath] => [begin] => 2016-01-02 00:00:00 [end] => 2016-01-03 00:00:00 ) ) echo "TOURNAMENTS <br />"; $data = $tournament->getAllTournaments(); echo "<br/>"; print_r($data); echo "<br/>"; if (count($data) == 0) { echo "Kein Turnier angelegt!"; } else { echo "<table>"; echo "<tr><th>key</th><th>_Id</th><th>name</th><th>rounds</th><th>link</th><th>logoPath</th><th>begin</th><th>end</th><th></th></tr>"; if (array_key_exists(0, $data)) { foreach ($data as $key => $value) { echo "<form id='login", $value['_Id'], "' method='post' action='start.php'>"; echo "<tr><td>", $key, " => </td><td>", $value['_Id'], "</td><td>", $value['name'], "</td><td>", $value['rounds'], "</td><td>", $value['link'], "</td><td>", $value['logoPath'], "</td><td>", $value['begin'], "</td><td>", $value['end'], "</td>"; echo "<td><input type='hidden' name='tId' value='", $value['_Id'], "' />"; ?> <a href="#" onclick="javascript:document.forms['login<?php