this selects the data from the database and it gets worked upon

```
    $name = mysqli_real_escape_string($connect, $_GET['name']);
                if (isset($_GET['name'])) {
                # code...

                        echo "</br> <br>";

                $count="SELECT id,employee_name, employee_salary, employee_age, class_id, (( employee_salary + employee_age + employee_allowance)/(100) * 100) AS staff_percentage, (employee_salary + employee_allowance + employee_age ) as staff_total FROM `employee`
                ";

                echo "<table>";
                echo "<tr><th>id</th><th>employee name</th><th>employee salary</th><th>employee age</th><th>employee allowance</th><th>staff total</th><th>staff total</th></tr>";

                    foreach ($connect->query($count) as $row) {
                    echo "<tr ><td>$row[id]</td><td>$row[employee_name]</td><td>$row[employee_salary]</td><td>$row[employee_age]</td><td>$row[employee_allowance]</td><td>$row[staff_percentage]%</td><td>$row[staff_total]</td></tr>";

```

At this place i want to catch the data that has been worked upon and send it to the database, not just for one id but for all ocuurence

```
                    $sql = "UPDATE `employee` set employee_name = '" . $row["employee_name"] . "', employee_salary='" . $row["employee_salary"]."', employee_allowance='" . $row["employee_age"]."', class_id='" . $row["class_id"]. "', class_total;='" . $row["staff_total"]."', staff_percentage='" . $row["staff_percentage"]. "'";
                                $result = $connect->query($sql);

                                print "<script>alert('you have been registerded succesfully!');</script>";
                                        }

            echo "</table>";

            }

```