prepare("update uyeler set " /> prepare("update uyeler set " />
1. sayfa
<?phpif(!isset($_SESSION['eposta'])){ echo "<br/><br /><br /><center><span class='hata'>Bu sayfayı görme yetkiniz yok.</span><br /><br /><br />"; header("location:index.php"); exit; } ?><? $id = "id"; if($id){ if($_POST){ $std = $_POST["std_id"]; $adi = $_POST["adi"]; $update = $db->prepare("update uyeler set std_id=?, adi=? where id=?"); $ok = $update->execute(array($std,$adi,$id)); if($ok){ echo "<script>window.location = 'profil.php'</script>"; }else { echo '<div class="alert alert-success">Profil güncelleme hatası.</div>'; } } ?> <div class="container"> <div class="row"> <br> <br> <form action="" method="post"> <div class="form-group col-md-2"> <label>Üye ID</label> <input name="std_id" class="form-control" type="text" value="<? echo $_SESSION['std_id']; ?>"/> </div> <div class="form-group col-md-3"> <label>Üye Adı</label> <input name="adi" class="form-control" type="text" value="<? echo $_SESSION['adi']; ?>"/> </div>
Üstteki kodlara sessionlar geliyor. Fakat güncelleme yapamıyorum. Yardımlarınızı bekliyorum.