So, I have the following problem:
I have a table which I fill with the data from my MySQL database and then display on a site. I want to make it so you can change e.g. the description afterwards. Instead what I get right now is that I empty the value. I can't see where my code goes wrong, so I'd appreciate some help. :)
HTML
<tbody>
    <?php
        foreach($records as $r) {                       
    ?>
        <tr><?php
            echo "<td>" . "<div class=table-image>" . "<img src=Assets/Images/" . escape($r->name) . " </td>". "</div>";
            ?>
            <td><div class="data"><?php echo escape($r->name); ?></div></td>
            <td><div class="data"><?php echo escape($r->location); ?></div></td>
            <td><div class="data"><?php echo escape($r->partners); ?></div></td>
            <td><a href="https://goo.gl/maps/S5Drk" target="_blank">◈ Google Maps</a></td>
            <td class="tDesc">
                <div class="desc">
                    <input class="form-control"  value="<? echo escape($r->description); ?>" name="description" type="text">
                </div>
            </td>
            <td>
                <?php echo escape($r->date); ?>
            </td>
            <td>
                <form method="post" action="" enctype="multipart/form-data">
                    <input type="submit" value="<? echo escape($r->id); ?>" name="delete">
                </form>
            </td>
            <td>
                <form method="post" action="" enctype="multipart/form-data">
                    <input type="submit" value="<? echo escape($r->id); ?>" name="update">
                </form>
            </td>
        </tr>
    <?php
        }
    ?>
</tbody>
PHP
if(isset($_POST['update']) ){
    $des = $_POST['description'];
    $UpdateQuery = "UPDATE repo SET description = '$des', date = NOW() WHERE id ='$_POST[update]' ";          
    mysql_query($UpdateQuery);
};
 
     
    