通过PHP表更新SQL数据库时遇到问题

Trying to Update the MySQL Tables but nothing is being updated, I'm sure I'm just not seeing the tiny issue, would love some help. Thanks

So its a trade block for a hockey pool, if you want the player on the trade block then you just check the CHECKBOX in the form and submit and it should change the value in the database to value of "1".

FORM:

echo "<table border='1'>";

echo "<tr><th>NAME</th> <th>POS</th> <th>BLOCK</th></tr>";

$counter = 1;

while($row = mysql_fetch_array( $result )) {

echo "<tr><td>"; 

echo "{$row['f_name']}" . " " . "{$row['l_name']}";

echo "</td><td><input name='pl_id[$counter]' type='hidden' value='{$row['pl_id']}'>";

echo "{$row['pos']}";

echo "</td><td><input name='pos[$counter]' type='hidden' value='{$row['pos']}'>";                                   


    echo "<input type='checkbox' name='block[$counter]' size='1' value='1'";

    if($row['block'] == '1')
    {
        echo "checked='checked'";
    }

    echo "></td></tr>";                 

$counter++;

} 
echo "</table>";

SUBMIT PHP PAGE:

mysql_connect("localhost", "user", "pass") or die(mysql_error());
mysql_select_db("mbbcom1_fantrax") or die(mysql_error());

$i = 1;
while ($i < 26) {

$block = $_POST['block'][$i];
$pl_id = $_POST['pl_id'][$i];

$query = mysql_query("UPDATE 'players'
                     SET  `block` = '$block' 
                     WHERE `players`.`pl_id` = '$pl_id'");                  
mysql_query($query); 

$i++; }

echo mysql_close();

Remove comma before WHERE

mysql_query("UPDATE 'players' SET block = '$block' WHERE players.pl_id = '$pl_id'");

You have a } to less, so the PHP code doesn't run.

You do a while loop and a foreach loop, but you are only closing the for loop.

And of course you don't need a , before the WHERE statement