<?php include("includes/header.php"); ?>
<div id="main-content">
<noscript>
<div class="notification error png_bg">
<div>
Tarayıcınızda Javascript yüklü değil ya da desteklemiyor. Lütfen tarayıcınızı <a href="http://browsehappy.com/" title="Upgrade to a better browser">Güncelleyin</a> yada <a href="http://www.google.com/support/bin/answer.py?answer=23852" title="Enable Javascript in your browser">Javascript Eklentisini aktif ediniz.</a>.
</div>
</div>
</noscript>
<!--İçerik Başlar-->
<!--Başlık -->
<h3>Kullanıcı Güncelle</h3>
<p id="icsayfa-intro">Kullanıcı Bilgilerini Değiştiriniz.</p>
<!--Başlık -->
<div class="clear"></div>
<!--Tablo -->
<div class="content-box">
<div class="content-box-header">
<h3>Kullanıcı Güncelleme Formu</h3>
<div class="clear"></div>
</div>
<div class="content-box-content">
<div class="tab-content default-tab" id="tab1">
<?php
if($_GET['kayit'] == 1)
{
if(!isset($_POST['kullaniciadi']) || empty($_POST['kullaniciadi'])){
$hata = "Bütün Alanlari Doldurmadan Güncelleyemezsiniz.";
}
if(!isset($_POST['kullaniciadi']) || empty($_POST['kullaniciadi'])){
$hata = "Bütün Alanlari Doldurmadan Güncelleyemezsiniz.";
}
if(!$hata){
$kullaniciadi=$_POST['kullaniciadi'];
$sifre=md5($_POST['sifre']); // gelen şifreyi md5 e çeviriyoruz güvenlik nedeni ile
mysql_query("UPDATE kullanicilar SET kullaniciadi='$_POST[kullaniciadi]', sifre=md5('$_POST[sifre]') WHERE id='$_POST[sayfa]'");
$mesaj = "Sayfa Basariyla Güncellendi";
}
}
if($_GET['sayfa']){
$sayfa = $_GET['sayfa'];
}else{
$sayfa = $_POST['sayfa'];
}
$sorgu = mysql_query("SELECT * FROM kullanicilar WHERE id='$sayfa'");
$bilgi = mysql_fetch_array($sorgu);
?>
<!-- Form Başladı -->
<form name="yeni_sayfa" action="kullanici-guncelle.php?kayit=1" method="post" enctype="multipart/form-data">
<input type="hidden" name="sayfa" value="<?php echo $bilgi[id]; ?>" />
<?php
if($hata){
echo "<p>{$hata}</p>";
}
if($mesaj){
echo "<p>{$mesaj}</p>";
}
?>
<fieldset>
<p>
<label>Kullanıcı Adı</label>
<input class="text-input small-input" type="text" name="kullaniciadi" value="<?php echo $bilgi[kullaniciadi]; ?>" />
<br /><small>Lütfen Türkçe Karakter Kullanmayınız!</small>
</p>
<p>
<label>Kullanıcı Yetki</label>
<select name="yetki" class="small-input">
<option value="1">Normal</option>
<option value="2">Editör</option>
<option value="3">Yönetici</option>
</select>
</p>
<p>
<label>E-Posta</label>
<input class="text-input small-input" type="text" name="mail" value="<?php echo $bilgi[mail]; ?>" />
<br /><small>Lütfen e-posta adresinizi doğru giriniz.</small>
</p>
<p>
<label>Şifrenizi Belirleyiniz</label>
<input class="text-input small-input" type="password" name="sifre" value="<?php echo $bilgi[sifre]; ?>" />
<br /><small>Lütfen Boşluk Bırakmayınız!</small>
</p>
<input type="button" value="Geri Dön" onclick="window.location.href='kullanici-yonetimi.php'" class="button" >
<input type="submit" value="Güncelle" class="button" >
</fieldset>
</form>
<!-- Form Bitti -->
</div>
</div>
</div>
<div class="clear"></div>
<!--İçerik Biter-->
<div id="footer">
<small>
</small>
</div>
</div>
</div>
</body>
</html>Arkadaşlar yukarıdaki kod blogunda ne gibi bir hata yapmışım lütfen birisi bakıp anlatabilirmi normalde başka sayfalarda verileri yazıyor ama bu kısımda yazmıyor.