PHP-Code:
if($_POST['eintragen'] == "Eintragen"){
echo "<pre>";
print_r($_POST);
echo "</pre>";
foreach ($_POST[tore_][heim] AS $key => $value){
if($value == $_POST[tore_][gast]) $s_team = 0;
if($value > $_POST[tore_][gast]) $s_team = $_POST[iduser_heim];
if($value < $_POST[tore_][gast]) $s_team = $_POST[iduser_gast];
echo("INSERT INTO ****************_daten (heim,gast,idteams_heim,idteams_gast,tore_heim,tore_gast,s_teamid,tag,monat,jahr,zeit,komment)
VALUES (
'$_POST[iduser_heim]',
'$_POST[iduser_gast]',
'$_POST[idteams_heim]',
'$_POST[idteams_gast]',
'$value',
'$key[value]',
'$s_team',
'$_POST[tag]',
'$_POST[monat]',
'$_POST[jahr]',
NOW(),
'$_POST[komment]')
");
}
Kommentar