Forum Moderators: coopster
foreach($_POST['playerid'] as $key => $playerid) {
$sql = "INSERT INTO stats VALUES(NULL, '".$_POST['playerid'][$key]."', '".$_POST['year']."', '0', '0', '0', '0')";
}
foreach($_POST['goalie'] as $key2 => $goalie) {
$sql2 = "INSERT INTO goalies VALUES(NULL, '".$_POST['goalie'][$key2]."', '".$_POST['year']."', '0', '0', '0', '0', '0', '0', '0')";
}
This is the form output
Array
(
[playerid] => Array
(
[0] => 8
[1] => 18
)[goalie] => Array
(
[0] => 18
)[year] => 200607
)
I can't seem to get them to update. It worked before I added the second table insert. I've fiddled with it so there may be a couple new errors now. But any help would be nice! Thanks.