Here is the full code. I had the same problem with the checkboxes. See how I got around it
PHP Code:
$getallplayers2 = $DB_site->query(" SELECT cclpinternational_players.*, predictions2.predscore2 as score2, predictions2.predplayer2 as players2, predictions2.predminutes2 as gminutes2 FROM " . TABLE_PREFIX . "cclpinternational_players LEFT JOIN cclpinternational_predictions as predictions2 ON((cclpinternational_players.teamid=predictions2.teamid2) AND (predictions2.userid='$bbuserinfo[userid]')) WHERE teamid='$tid2' "); if ($DB_site->num_rows($getallplayers2) == 0) { $playerlist2="<tr><td colspan=\"5\" align=\"center\"><p><span class=\"smallfont\"><strong><font color=\"#99000\">Line up is not available yet or no line up</font></strong></span></p></td></tr>"; } else { while ($getplayers2 = $DB_site->fetch_array($getallplayers2)) { $predscore2=$getplayers2['score2']; $playerid2=$getplayers2['id']; $playerlname2=$getplayers2['lname']; $playerfname2=$getplayers2['fname']; $playerposition2=$getplayers2['position']; $playernumber2=$getplayers2['number']; $playerinfo2=$getplayers2['info']; $playerphoto2=$getplayers2['photo']; $predplayer2="$playerlname2$playerfname2"; $player2=unserialize($getplayers2['players2']); if ($predplayer2==$player2[0] OR $predplayer2==$player2[1] OR $predplayer2==$player2[2] OR $predplayer2==$player2[3] OR $predplayer2==$player2[4] OR $predplayer2==$player2[5] OR $predplayer2==$player2[6] OR $predplayer2==$player2[7] OR $predplayer2==$player2[8] OR $predplayer2==$player2[9] OR $predplayer2==$player2[10] OR $predplayer2==$player2[11] OR $predplayer2==$player2[12] OR $predplayer2==$player2[13] OR $predplayer2==$player2[14] OR $predplayer2==$player2[15]) { $checked = "checked";}else { $checked = "";} $checkbox2 ="<input type=\"checkbox\" name=\"predplayer2[]\" value=\"$predplayer2\" $checked>"; $predminutes2=unserialize($getplayers2['gminutes2']); for( $i2=0; $i2 < count($predminutes2); $i2++) { $minutes2="<input type=\"text\" name=\"predminutes2[]\" value=\"$predminutes2[$i2]\" size=\"10\">"; } eval('$playerlist2 .= "' . fetch_template('soccer_predictplayer2') . '";'); }
That was the original which displays only the last value in all boxes, then your changes.