Damned guess I solved it 🙂
Sorry to bother anyone but if you see something that can be improved please say so 🙂
here is how I think it should be
it works this way 🙂
<html>
<head><title>My beutifull web page</title></head>
<body>
<?php
$timovi = array(arsenal, chelsea, manu, yeovil, manc, everton, blackburn);
$timovi_engleska = array (arsenal, chelsea);
$domacin = array(arsenal, chelsea, manu, yeovil, manc, everton, arsenal);
$gost = array(chelsea, manu, manc,arsenal, everton, arsenal, blackburn);
$domacin_gol = array(1,2,4,2,1,6,3);
$gost_gol = array(2,3,1,0,0,3,3);
$empty_space = " ";
$minus = " - ";
$lige = array(engleska, nemacka, francuska);
?>
<form method="POST" action="liga.php">
Choose your league!<br>
<select name="izabrana_liga">
<?php
for ($counter = 0; $counter < 7; $counter++)
{
echo "<option>$lige[$counter]</option>";
}
echo "</select>";
?>
<input type="submit" value="Submit">
</form>
<form method="POST" action="liga.php">
<input type="hidden" name="posted" value="true">
Choose your team!<br>
<select name="izabrani_tim">
<?php
if ($_POST['izabrana_liga'] == engleska)
{
for ($counter2 = 0; $counter2 < 7; $counter2++)
{
echo "<option>$timovi_engleska[$counter2]</option>";
}
}
echo "</select>";
?>
<input type="submit" value="Submit">
</form>
<?php
if (isset ($POST['posted']))
{
echo "<hr><table> <tr align=center>";
echo "<th>Home<th>$empty_space<th>Away<th colspan='4'> Score";
for ($counter = 0; $counter < 7 ; $counter++)
{
if ($POST['izabrani_tim'] == $domacin[$counter])
{
echo "<tr>";
echo "<td>$POST[izabrani_tim] <td>$minus <td>$gost[$counter] <td>$empty_space <td>$domacin_gol[$counter]
<td>$minus <td>$gost_gol[$counter]";
}
if ($POST['izabrani_tim'] == $gost[$counter])
{
echo "<tr>";
echo "<td>$domacin[$counter] <td>$minus <td>$_POST[izabrani_tim] <td>$empty_space <td>$domacin_gol[$counter]
<td>$minus <td>$gost_gol[$counter]";
}
}
}
?>
</table>
</body>
</html>