Why is only one table row updated? (MySQL & PHP) : I'm trying to update the `rank` column in the `users` table in MySQL using PHP, but when i try to change the values and press the `update` button, **only the last one** of the table rows is actually being updated. [Here][1] is an image of what the PHP table looks like on the webpage. Here is the code: 
    <html>
    <head>
    </head>
    <body>
    <?php
    include '../db/connect.php';
    $con = $MySQLi_CON;
    if (!$con){
        die("Can not connect: " . mysql_error());
    }
    
    if(isset($_POST['update'])){
        $UpdateQuery = "UPDATE users SET rank='$_POST[rank]' WHERE user_id='$_POST[hidden]'";
        $con->query($UpdateQuery);
    }
    //$sql = "SELECT * from users";
    //$myData = mysql_query($sql, $con);
    $result = $MySQLi_CON->query("SELECT * FROM users") 
        or die(mysql_error());  
    echo "<table border=1>
    <tr>
        <th>ID</th>
        <th>Username</th>
        <th>Email</th>
        <th>Rank</th>
    </tr>";
    while($record = $result->fetch_array()){
        echo "<form action='test3.php' method='post'";
        echo '<tr>';
        echo '<td>' . $record['user_id'] . '</td>';
        echo '<td>' . $record['username'] . '</td>';
        echo '<td>' . $record['email'] . '</td>';
        echo '<td>' . '<input type="number" name="rank" min="0" max="100" value="' . $record['rank'] . '"></td>';
        echo '<td>' . '<input type="hidden" name="hidden" value="' . $record['user_id'] . '"</td>';
        echo '<td>' . '<input type="submit" name="update" value="update"' . '</td></tr>';
    }
    echo "</table>";
    $con->close();



  [1]: http://i.stack.imgur.com/T9ESy.png