<?php
	$adi_soyadi=$_POST['adi_soyadi'];
	$email=$_POST['email'];
	$sifre=md5($_POST['sifre']);
	$rsifre=md5($_POST['rsifre']);
	$telefon=$_POST['telefon'];
	$sehir=$_POST['sehir'];
	$ulke=$_POST['ulke'];
	if($_POST["guncelle"]){
		if($sifre==$rsifre){
			if($sifre=='d41d8cd98f00b204e9800998ecf8427e'){
		$duzen="adi_soyadi='".$adi_soyadi."',email='".$email."',telefon='".$telefon."',sehir='".$sehir."',ulke='".$ulke."'";
		}else{
			$duzen="adi_soyadi='".$adi_soyadi."',email='".$email."',telefon='".$telefon."',sehir='".$sehir."',ulke='".$ulke."',sifre='".$sifre."'";
			
		}
				mysql_query("update uyeler set $duzen  where id='".$_SESSION["uyekullanici"]."'")or die(mysql_error());
	//$sid = mysql_insert_id();  
				echo "Bilgiler Düzenlendi";
				
	}else{
		echo "Girdiginiz Sifreler birbiriyle Uyusmuyor.Tekrar Deneyiniz.";	
	}
	}
	if($_SESSION["uyekullanici"]){
	$bilgi=mysql_fetch_assoc(mysql_query("select * from uyeler where id='".$_SESSION["uyekullanici"]."'"));
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
     <div class="center_title_bar">Bilgileri D&uuml;zenle</div>
     <div class="prod_box_big">
      
            <div class="center_prod_box_big">            
                 <form action="sayfa.php?sayfa=uyeler" method="post">
              	<div class="contact_form">
                      <div class="form_row">
                    <label class="contact"><strong>Ad&#305; Soyad&#305;:</strong></label>
                    <input type="text" class="contact_input"  name="adi_soyadi" value="<?=$bilgi["adi_soyadi"];?>"/>
                    </div>       
                  <div class="form_row">
                    <label class="contact"><strong>E-Mail:</strong></label>
                    <input type="text" class="contact_input"  name="email"  value="<?=$bilgi["email"];?>"/>
                    </div>  

                    <div class="form_row">
                    <label class="contact"><strong>Sifre:</strong></label>
                    <input type="password" class="contact_input" name="sifre"/>
                    </div>
   <div class="form_row">
                    <label class="contact"><strong>Sifre Tekrar:</strong></label>
        <input type="password" class="contact_input"  name="tsifre"/>
                  </div>

                  <div class="form_row">
                    <label class="contact"><strong>Telefon:</strong>&nbsp;+</label>
                    
                    <input type="text" class="contact_input" name="telefon"  value="<?=$bilgi["telefon"];?>"/>
                    </div>
                     <div class="form_row">
                    <label class="contact"><strong>Sehir:</strong></label>
                    
                    <input type="text" class="contact_input" name="sehir"  value="<?=$bilgi["sehir"];?>"/>
                    </div>
                  <div class="form_row">
                    <label class="contact"><strong>Ülke:</strong></label>
                    <input type="text" class="contact_input" name="ulke"  value="<?=$bilgi["ulke"];?>"/>
                    </div>


                    <div class="form_row"></div>

                    
                    <div class="form_row">
                     <input type="submit" name="guncel" value="Güncelle">
                    </div>      
                    
                </div> 
                
                     <input type="hidden" name="guncelle" value="guncelle">
				</form>                
            </div>
                                 
        </div>