function sifreGuncelle(KullaniciGiris $kul) { try { $baglanti = new VeriTabaniBaglanti(); $conn = $baglanti->pdo_baglanti(); $update = $conn->prepare("update kullanicigiris set sifre=? where email=?"); $sonuc = $update->execute(array($kul->getSifre(), $kul->getEmail())); if ($sonuc) { echo '<center><p style="color:green;">Şifreniz Güncellendi</p></center>'; header("refresh:2;url=profilGoruntule.php"); } else { echo '<center><p style="color: red;">Şifreniz Güncellenemedi</p></center>'; } } catch (PDOException $ex) { die($ex->getMessage()); } finally { if ($conn != null) { $conn = $baglanti->pdo_sonlandir(); } } }