prepare("select * from section where sn = $id") ; $getd->execute() ; $row = $getd->fetch(pdo::FETCH_ASSOC) ; $unames = $row['names'] ; if(isset($_POST['submit'])) { $names = trim($_POST['names']) ; $upd = $DBcon->prepare("update section set names =:a where sn = $id") ; $upd->bindparam(":a",$names) ; if($upd->execute()) header("location: regsections.php") ; } ?> Edit Department

Edit Department