1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | <table> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <?php include("database.php"); $speelronde = $_POST['speelronde']; $sql = ("SELECT * FROM Wedstrijden WHERE WSpeelronde='".$speelronde."' ORDER BY WWedstrijdID"); $uitvoer = mysql_query($sql) or die (mysql_error()); while($result = mysql_fetch_array($uitvoer)){ ?> <tr> <td><?php print $result['WThuisploeg']; ?><input name="WThuisploeg" value="<?php print $result['WThuisploeg']; ?>" size="1" type="hidden"/></td> <td>-</td> <td><?php print $result['WUitploeg']; ?><input name="WUitploeg" value="<?php print $result['WUitploeg']; ?>" size="1" type="hidden"/></td> <td><input name="ScoreThuis" size="1" /></td> <td>-</td> <td><input name="ScoreUit" size="1" /></td></tr> <?php } ?> <tr><td><input type="submit" value="Invoeren" /></td></tr></form></table> <?php if($_SERVER['REQUEST_METHOD'] == 'POST'){ $WScoreThuis = $_POST['ScoreThuis']; $WScoreUit = $_POST['ScoreUit']; $WThuisploeg = $_POST['WThuisploeg']; $WUitploeg = $_POST['WUitploeg']; $sql1 = ("UPDATE Wedstrijden SET WScoreThuis='".$WScoreThuis."', WScoreUit='".$WScoreUit."' WHERE WThuisploeg='".$WThuisploeg."' AND WUitploeg='".$WUitploeg."' "); $invoer = mysql_query($sql1) or die (mysql_error()); } ?> |
Forum Opties | |
---|---|
Forumhop: | |
Hop naar: |