I got this code that generates a table and matches teams in a round robin tournament system.
I retrieved 3 teams on tbl_teams and
displayed it on a table that creates games and matches each team to
each other. It is like this...
I got team1, team2 and team3 from tbl_teams output of my code:
team1 vs team3
team2 vs team0
team3 vs team2
Question: how to save this output in tbl_games? I used PHP echo in displaying the output on tables which made it hard to save it.
Here is my code:
<th width="35%">Group 1 Match</th>
<th></th>
<th width="35%"></th>
<th width="15%">Date of Game</th>
<th width="15%">Time of Game</th>
<tr><td><b>Round 1</td></b></tr>
<tr>
<td>   <?php echo $x[0]->team_name; ?></td>
<td>VS</td>
<td>   <?php echo $x[2]->team_name; ?></td>
<td><input type="date" name="date"></td><td><input type="time" name="time"></td>
</tr>
<tr><td><b>Round 2</td></b></tr>
<tr>
<td>   <?php echo $x[1]->team_name; ?></td>
<td>VS</td>
<td>   <?php echo $x[0]->team_name; ?></td>
<td><input type="date" name="date"></td><td><input type="time" name="time"></td>
</tr>
<tr><td><b>Round 3</td></b></tr>
<tr>
<td>   <?php echo $x[2]->team_name; ?></td>
<td>VS</td>
<td>   <?php echo $x[1]->team_name; ?></td>
<td><input type="date" name="date"></td><td><input type="time" name="time"></td>
</tr>
$x[0], [1] and [2] contains the result of my query which are the 3 teams
echohave to do with anything?