Yine aynı hata farklı bir yerde kullanım farklı olduğu için düzeltemedim
if(isset($_POST["guncelle"])) { $guncelle = $db->prepare("update kütüphane set adsoyad = adsoyad, kulad = kulad, sifre = sifre, yas = yas where id = id"); $kontrol = $guncelle->execute(array( "adsoyad" => $_POST["adsoyad"], "kulad" => $_POST["kulad"], "sifre" => $_POST["sifre"], "yas" => $_POST["yas"], "id" => $_POST["id"])); if($kontrol) { header("Location:kullanici_guncelle.php"); exit; } else { echo "Hata"; } }
Şeklinde de kullanabilirsin
if(isset($_POST["guncelle"])) { $guncelle = $db->prepare("update kütüphane set adsoyad = ?, kulad = ?, sifre = ?, yas = ? where id = ?"); $kontrol = $guncelle->execute(array( $_POST["adsoyad"], $_POST["kulad"], $_POST["sifre"], $_POST["yas"], $_POST["id"]) ); if($kontrol) { header("Location:kullanici_guncelle.php"); exit; } else { echo "Hata"; } }