i have created a table that has a edit button on each row

```
ID Name Age Class  EDIT
1  sam  12  12th   edit 

```

the code used for the edit button is

```
echo "<td><a href=\"admin_edit_members.php?id=".$row['id']."\">Edit</a></td>";

```

Code used on admin\_edit\_members.php page is:

```
<form class="form-horizontal" role="form" action="<?php $_PHP_SELF ?>" enctype="multipart/form-data" method="post">
    <div class="form-group">
        <label class="col-lg-3 control-label">Name:</label>
        <div class="col-lg-8">
            <input class="form-control" value="" type="text" name="name">
        </div>
    </div>

    <div class="form-group">
        <label class="col-lg-3 control-label">Age:</label>
        <div class="col-lg-8">
            <input class="form-control" value="" type="text" name="age">
        </div>
    </div>

    <div class="form-group">
        <label class="col-lg-3 control-label">Class:</label>
        <div class="col-lg-8">
            <input class="form-control" value="" type="text" name="class">
        </div>
    </div>

    <div class="form-group">
        <label class="col-md-3 control-label"></label>
        <div class="col-md-8">
            <input class="btn btn-primary" value="Save Changes" type="submit" name="submit">
            <span></span>
        </div>  
    </div>
</form>

<?php
    $con=mysqli_connect("localhost","root","","db");
    // Check connection
    if (mysqli_connect_errno()) {
        echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }

    // escape variables for security
    $id = $_GET['id'];
    $name = mysqli_real_escape_string($con, $_POST['name']);
    $age = mysqli_real_escape_string($con, $_POST['age']);
    $class = mysqli_real_escape_string($con, $_POST['class']);

    $sql = "UPDATE student SET name='".$name."',age='".$age."',class='".$class."' WHERE id ='".$id."'";

    if (!mysqli_query($con,$sql)) {
        die('Error: ' . mysqli_error($con));
    }
    header("Location: student_list.php");
    exit;
    mysqli_close($con);
?>      

```

my problem is that when i edit the form i need to edit all the fields or else a blank value entered in the database. is there a way where the user can edit only spefic fields he wants