Im sorry if this is a stupid question but ive been stuck on this for hours, the closest answer I got was from this post but the issue is not resolved.
Im getting data from checkboxes from a simple form. The forms action takes user to next page, I get the values from checkboxes using
$event = $_Post['matchId'];
var_dump($event) confirms values has been received correctly(see image)

The value of $event is an array so im doing the following
foreach($event as $key => $eventId)
//some code
All is working in the forloop however as soon as I click submit the isset() function gets trigered I get error:
Undefined Index: matchId
Invalid Argument for forloop
Any idea what I am doing wrong here Please let me know if you require more info
update on requested isset code
$event= $_POST['matchId'];
var_dump($event);
foreach($event as $key => $eventId){
$sql = "Select * FROM events WHERE event_id = $eventId";
$result = mysql_query($sql);
$i=0;//counter
while($row=mysql_fetch_array($result)){
$team1 = $row['team1'];
$team2 = $row['team2'];
$id[$i]= $row['event_id'];
echo'<h3>'.$team1.' VS '.$team2.'</h3>';
echo'<select name="id[]">';
echo'<option value="'.$row['team1'].'">'.$team1.'</option>';
echo'<option value="'.$row['team2'].'">'.$team2.'</option>';
echo'</select>';
echo'By <select name="score[]">';
echo'<option value="1">1</option>';
echo'<option value="2">2</option>';
echo'<option value="3">3</option>';
echo'<option value="4">4</option>';
echo'<option value="5">5</option>';
echo'<option value="6">6</option>';
echo'<option value="7">7</option>';
echo'<option value="8">8</option>';
echo'<option value="9">9</option>';
echo'<option value="10">10</option>';
echo'<option value="11">11</option>';
echo'<option value="12">12</option>';
echo'<option value="13">13</option>';
echo'<option value="14">14</option>';
echo'<option value="15">15</option>';
echo'<option value="16">16</option>';
echo'<option value="17">17</option>';
echo'<option value="18">18</option>';
echo'<option value="19">19</option>';
echo'<option value="20">20</option>';
echo'</select>';
$i++;
}//while
}//for
echo'</legend></fieldset>';
echo'<input type="submit" class="buttono" value="Submit" name="submit" />';
echo'</form>';
echo'</div><!--news-->';
if(isset($_POST['submit'])){
$x=0;
foreach($_POST['id'] as $key => $winner){
$score = $_POST['score'][$key];
var_dump($score);
$winnerb = $id[$key];
echo($winner."-".$winnerb);
$sql="INSERT INTO picks(member_nr,event_id,pick,score)
VALUES('$userId','$winnerb','$winner','$score')";
mysql_query($sql) or trigger_error(mysql_error()." in ".$sql);
}//for
}//end isset
isset?idandmatchIdyou are just wasting everybody's time.