PHP选择提交不起作用

I have rows in my database and it has a column called value. I'm making a page to update the value to aan (English: on) or uit (English: off).

However, when submitted, there's a 1 in the value column instead of aan or uit.

The ID of the row is 1, so that's why there's a 1 but I don't know what is going wrong and why it's not submitting the aan or uit.

What's going wrong?

    <?php
    $stmt = $dbConnection->prepare('SELECT * FROM settings ORDER BY id ASC');
    $stmt->execute();

    $result = $stmt->get_result();
    if(mysqli_num_rows($result) > 0) {
        ?>
    <form method="POST" action="">
        <table>
        <tr>
            <th>Naam</th>
            <th>Laatst gewijzigd</th>
            <th>Waarde</th>
        </tr>
        <?php
    while ($row = $result->fetch_assoc()) {
        if(isset($_POST["opslaan"])) {
            $id = $row["id"];
            $stmt = $dbConnection->prepare('UPDATE settings SET value = ? WHERE id = ?');
            $stmt->bind_param('ss', $id, $id);
            $stmt->execute();
        }
    ?>
        <tr>
            <td><?php echo $row["code"]; ?></td>
            <td><?php echo $row["updated"]; ?></td>
            <td><select name="<?php echo $row["id"]; ?>"><option value="aan"<?php if($row["value"] == "aan") {echo ' selected';} ?>>Aan</option><option value="uit"<?php if($row["value"] == "uit") {echo ' selected';} ?>>Uit</option></select></td>
        </tr>
    <?php } ?>
        </table>
    <input type="submit" value="Opslaan" name="opslaan">
    </form>
    <?php
    } else {
        echo "<p>Er zijn nog geen instellingen.</p>";
    }
}
    ?>

Why don't you change the name of the Select instead like so:

    <td>
        <select name="aan_uit">  <!-- <== GIVE THE SELECT THE NAME aan_uit -->
            <option value="aan"<?php if($row["value"] == "aan") {echo ' selected';} ?>>Aan</option>
            <option value="uit"<?php if($row["value"] == "uit") {echo ' selected';} ?>>Uit</option>
        </select>
    </td>       

PHP

<?php


    if(isset($_POST["opslaan"])) {
        $id      = $row["id"];
        $aanUit  = htmlspecialchars(trim($_POST["aan_uit"])); //<== EXTRACT "aan_uit" FROM THE POST VARIABLE.
        $stmt    = $dbConnection->prepare('UPDATE settings SET value = ? WHERE id = ?');
        $stmt->bind_param('ss', $aanUit, $id);  // <== SET TO $aanUit, NOT $id
        $stmt->execute();
    }

So now the entire Form-Block should look like so:

    <form method="POST" action="">
        <table>
            <tr>
                <th>Naam</th>
                <th>Laatst gewijzigd</th>
                <th>Waarde</th>
            </tr>
            <?php
                while ($row = $result->fetch_assoc()) {
                    if(isset($_POST["opslaan"])) {
                        $id     = $row["id"];
                        $aanUit = $row["aan_uit"];
                        $stmt   = $dbConnection->prepare('UPDATE settings SET value = ? WHERE id = ?');
                        $stmt->bind_param('ss', $aanUit, $id);
                        $stmt->execute();
                    }
                    ?>
                    <tr>
                        <td><?php echo $row["code"]; ?></td>
                        <td><?php echo $row["updated"]; ?></td>
                        <td>
                            <select name="aan_uit">
                                <option value="aan"<?php if($row["value"] == "aan") {echo ' selected';} ?>>Aan</option>
                                <option value="uit"<?php if($row["value"] == "uit") {echo ' selected';} ?>>Uit</option>
                            </select>
                        </td>
                    </tr>
                <?php } ?>
        </table>
        <input type="submit" value="Opslaan" name="opslaan">
    </form>