<body> <div class="container"> <div class="row"> <div class="col-md-1"> </div> <div class="col-md-7" style="margin-top:20px"> <h3 class="text-danger">Update patients Information :</h3> <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { $user_name = $_POST['user_name']; $email = $_POST['email']; if (empty($user_name) or empty($email)) { echo "<h4>Every field should be filup </h4>"; } else { $update = $user->Update($id, $user_name, $email); if ($update) { header('Location:list.php'); } else { echo "<h4>Error !</h4> "; } } } ?> <?php $find = $user->getuser($id); foreach ($find as $f) { ?> <form action="" method="post">