• 21-03-2010, 22:23:11
    #1
    Merhaba ben session ile uyeno olarak bağlanıp üye bilgilerini güncellemek istiyorum ama bir türlü yapamadım bu formda yanlış olan nedir acaba veya düzeltebilen varmı ya kaç gündür uğraşıyorum ?

    <?
    session_start();
    //Cachelemeyi engelle
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
    header("Cache-Control: no-store, no-cache, must-revalidate");  // HTTP/1.1
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache"); // HTTP/1.0
    include "ayarlar.php";
    $mesaj = "Yeni Kullanıcı Adınızı ve Şifrenizi giriniz.";
    //Mevcut Değerleri Oku
    include "baglan.php"; //MySQL'e Bağlan
    $sorgu = "SELECT * FROM uyeler WHERE uyeno = '$uyeno'";
    $sorgula = mysql_query($sorgu) or $hata = "Şifre Değişikliği (15)";
    if ($hata != "") { //Hata oluştuysa
       include "hata.php";
       exit;
    }
    $kuladi = mysql_result($sorgula, 0, "kuladi");  
    $sifre   = mysql_result($sorgula, 0, "sifre");
    //Giriş tuşuna basıldıysa...
    if ( isset($_POST["kaydet"]) ) { 
        $kuladi = $_POST["ykuladi"];
        $sifre = $_POST["ysifre"];
        $sorgu = "update uyeler set kuladi = '$kuladi', sifre = '$sifre'";
     $sorgula = mysql_query($sorgu) or $hata = "Şifre Değişikliği (36)";
     if ($hata != "") { //Hata oluştuysa
        include "kes.php"; 
        include "hata.php";    
        exit;
     }
     $mesaj = "Kullanıcı Adı ve Şifre değiştirildi.";
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9"> 
    <title>Untitled Document</title> 
    <style type="text/css"> 
    <!-- 
    body,td,th { 
     font-family: Arial, Helvetica, sans-serif; 
    } 
    body { 
     margin-left: 0px; 
     margin-top: 0px; 
     margin-right: 0px; 
     margin-bottom: 0px; 
    } 
    #panel { 
        background-repeat: no-repeat; 
        font-family: Arial, Helvetica, sans-serif; 
    } 
    #panel .panelust { 
     background-repeat: no-repeat; 
     background-image: url(images/uyepaneli/uyeust.png); 
     height: 55px; 
    } 
    #panel #panelic { 
     background-repeat: no-repeat; 
     height: 400px; 
    } 
    #panel a:link { 
     color: #000066; 
     text-decoration: none; 
     font-weight: normal; 
    } 
    #panel a:hover { 
     color: #3E89D7; 
     text-decoration: underline; 
    } 
    #panel a:active { 
     color: #000081; 
     text-decoration: none; 
    } 
    #panel a:visited { 
     color: #000081; 
     text-decoration: none; 
    } 
    .style2 {color: #C78717} 
    .style11 { 
     font-size: 15px; 
     font-weight: bold; 
    } 
    --> 
    </style> 
    </head> 
    <body> 
    <form  
    action="<? echo $_SERVER['PHP_SELF']; //Kendine yolla ?>" method="post" enctype="multipart/form-data" name="fmkayit" onSubmit="return kontrol()"> 
    <table width="834" height="380" border="0" cellpadding="0" cellspacing="0" id="panel"> 
      <tr> 
        <td height="47" colspan="2" valign="top"><div class="panelust"> 
          <table width="757" border="0" cellpadding="6"> 
            <tr> 
              <td width="539" valign="top">?php echo'<b>Hoşgeldiniz Sayın, <font color="#FF0000">'.$uyeadsoy.'</font></b>'; ?></td> 
              <td width="263"><a href="urunler.php"><img src="http://forum.ceviz.net/images/uyepaneli/uincele.png" alt="" width="213" height="34" border="0" /></a></td> 
            </tr> 
          </table> 
          </div></td> 
      </tr> 
      <tr> 
        <td width="823" valign="top"><div id="panelic"> 
          <table width="84%" height="165" border="0" cellpadding="10" cellspacing="2"> 
            <tr> 
              <td width="35%" bgcolor="#FFFFCC"><strong>Şifre Değiştir:  
      
      
                    <label></label> 
                  </strong></td> 
              <td width="45%"><input name="sifre" type="password" id="sifre" value="<? echo $sifre; ?>" /></td> 
              <td width="5%">&nbsp;</td> 
              <td width="15%">&nbsp;</td> 
            </tr> 
            <tr> 
              <td height="42" bgcolor="#FFFFCC"><strong>Adınız ve Soyadınız:          </strong></td> 
              <td><input name="eposta" type="text" id="eposta" value="<? echo $adsoy; ?>" /></td> 
              <td>&nbsp;</td> 
              <td>&nbsp;</td> 
            </tr> 
            <tr> 
              <td height="42" bgcolor="#FFFFCC"><strong>E-Posta Adresiniz:</strong></td> 
              <td><input name="eposta" type="text" id="eposta" value="<? echo $eposta ?>" /></td> 
              <td>&nbsp;</td> 
              <td>&nbsp;</td> 
            </tr> 
            <tr> 
              <td height="39" bgcolor="#FFFFCC"><strong>Adresiniz:</strong></td> 
              <td><textarea name="adres" cols="45" rows="10" id="adres"><? echo $adres; ?></textarea></td> 
              <td>&nbsp;</td> 
              <td>&nbsp;</td> 
            </tr> 
            <tr> 
              <td height="39" bgcolor="#FFFFCC"><span class="style11">Doğum Tarihiniz:</span></td> 
              <td><select name="gun" id="gun"> 
            <? for($g = 01 ; $g < 32 ; $g++) {?> 
            <option value=" <?=$g ?>"> 
              <?=$g ?> 
              </option> 
            <? } ?> 
          </select> 
            <select name="ay" id="ay"> 
              <? for($a = 01 ; $a < 13 ; $a++) {?> 
              <option value="<?=$a ?>"> 
                <?=$a ?> 
              </option> 
              <? } ?> 
            </select> 
            <select name="yil" id="yil"> 
              <? for($y = 1940 ; $y < 2011 ; $y++) {?> 
              <option value="<?=$y ?>"> 
                <?=$y ?> 
              </option> 
              <? } ?> 
          </select></td> 
              <td>&nbsp;</td> 
              <td>&nbsp;</td> 
            </tr> 
            <tr> 
              <td height="39" bgcolor="#FFFFCC"><strong>Cinsiyetiniz:</strong></td> 
              <td><select name="cins" id="cins"> 
            <option value="ERKEK" selected="selected">Erkek</option> 
            <option value="BAYAN">Bayan</option> 
        </select></td> 
              <td>&nbsp;</td> 
              <td> </td> 
            </tr> 
            <tr> 
              <td height="39">&nbsp;</td> 
              <td align="right"> 
                <input style="font-family: Tahoma; font-size: 8pt; color: #FFFFFF; font-weight: bold; border: 1px solid #000000; height:40; width:100; background-color: #ff8400" type="submit" name="kaydet" id="kaydet" value="Kaydet" />        </td> 
              <td colspan="2"><a href="cikis.php">Güvenli Çıkış</a>         </td> 
              </tr> 
          </table>  
        </div></td> 
        <td width="1">&nbsp;</td> 
        </tr> 
      <tr> 
        <td valign="top">&nbsp;</td> 
        <td>&nbsp;</td> 
      </tr> 
      <tr> 
        <td valign="top">&nbsp;</td> 
        <td>&nbsp;</td> 
      </tr> 
      <tr> 
        <td valign="top">&nbsp;</td> 
        <td>&nbsp;</td> 
      </tr> 
    </table> 
    </form>  
    </body> 
    </html>
  • 21-03-2010, 23:01:04
    #2
    Üyeliği durduruldu
    sesionu where ile kontrol edeceksin.

    session = id
    where id=id
  • 21-03-2010, 23:31:15
    #3
    <? 
    session_start();
    if ( !isset($_SESSION["uyeno"]) ) {
     die("Bu dosyaya yalnızca üyeler erişebilir.!");
    }
    $uyeno = $_SESSION["uyeno"];
    $uyeadsoy = $_SESSION["uyeadsoy"];
    $uyesifre = $_SESSION["uyesifre"];
    $uyeeposta = $_SESSION["uyeeposta"];
    $uyeadres = $_SESSION["uyeadres"];
    $uyetel = $_SESSION["uyetel"];
    $uyecins = $_SESSION["uyecins"];
    $uyegun = $_SESSION["uyegun"];
    $uyeay = $_SESSION["uyeay"];
    $uyeyil = $_SESSION["uyeyil"];
    include "baglan.php";
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9"> 
    <title>Untitled Document</title> 
    <style type="text/css"> 
    <!-- 
    body,td,th { 
     font-family: Arial, Helvetica, sans-serif; 
    } 
    body { 
     margin-left: 0px; 
     margin-top: 0px; 
     margin-right: 0px; 
     margin-bottom: 0px; 
    } 
    #panel { 
        background-repeat: no-repeat; 
        font-family: Arial, Helvetica, sans-serif; 
    } 
    #panel .panelust { 
     background-repeat: no-repeat; 
     background-image: url(images/uyepaneli/uyeust.png); 
     height: 55px; 
    } 
    #panel #panelic { 
     background-repeat: no-repeat; 
     height: 400px; 
    } 
    #panel a:link { 
     color: #000066; 
     text-decoration: none; 
     font-weight: normal; 
    } 
    #panel a:hover { 
     color: #3E89D7; 
     text-decoration: underline; 
    } 
    #panel a:active { 
     color: #000081; 
     text-decoration: none; 
    } 
    #panel a:visited { 
     color: #000081; 
     text-decoration: none; 
    } 
    .style2 {color: #C78717} 
    .style11 { 
     font-size: 15px; 
     font-weight: bold; 
    } 
    --> 
    </style> 
    </head> 
    <body> 
    <? 
    //Mevcut Değerleri Oku
    include "baglan.php"; //MySQL'e Bağlan
    $sorgu = "SELECT * FROM uyeler WHERE uyeno = '$uyeno'";
    $sorgula = mysql_query($sorgu) or $hata = "Şifre Değişikliği (15)";
    echo"burda hata";
    $kuladi = mysql_result($sorgula, 0, "kuladi");  
    $sifre   = mysql_result($sorgula, 0, "sifre");
    //Giriş tuşuna basıldıysa...
    if ( isset($_POST["kaydet"]) ) { 
        $kuladi = $_POST["ykuladi"];
        $sifre = $_POST["ysifre"];
        $sorgu = "update uyeler";
     $sorgu .= "set kuladi = '$kuladi', sifre = '$sifre' WHERE uyeno = $uyeno";
     $sorgula = mysql_query($sorgu) or $hata = "Şifre Değişikliği (36)";
     if ($hata != "") { //Hata oluştuysa
        echo"burdada hata";
     }
     $mesaj = "Kullanıcı Adı ve Şifre değiştirildi.";
    }
    ?>
    <form  
    action="<? echo $_SERVER['PHP_SELF']; //Kendine yolla ?>" method="post" enctype="multipart/form-data" name="fmkayit" onSubmit="return kontrol()"> 
    <table width="834" height="380" border="0" cellpadding="0" cellspacing="0" id="panel"> 
      <tr> 
        <td height="47" colspan="2" valign="top"><div class="panelust"> 
          <table width="757" border="0" cellpadding="6"> 
            <tr> 
              <td width="539" valign="top"><?php echo'<b>Hoşgeldiniz Sayın, <font color="#FF0000">'.$uyeadsoy.'</font></b>'; ?></td> 
              <td width="263"><a href="urunler.php"><img src="images/uyepaneli/uincele.png" alt="" width="213" height="34" border="0" /></a></td> 
            </tr> 
          </table> 
          </div></td> 
      </tr> 
      <tr> 
        <td width="823" valign="top"><div id="panelic"> 
          <table width="84%" height="165" border="0" cellpadding="10" cellspacing="2"> 
            <tr> 
              <td width="35%" bgcolor="#FFFFCC"><strong>Şifre Değiştir:  
      
      
                    <label></label> 
                  </strong></td> 
              <td width="45%"><input name="sifre" type="password" id="sifre" value="<? echo $uyesifre; ?>" /></td> 
              <td width="5%">&nbsp;</td> 
              <td width="15%">&nbsp;</td> 
            </tr> 
            <tr> 
              <td height="42" bgcolor="#FFFFCC"><strong>Adınız ve Soyadınız:          </strong></td> 
              <td><input name="eposta" type="text" id="eposta" value="<? echo $uyeadsoy; ?>" /></td> 
              <td>&nbsp;</td> 
              <td>&nbsp;</td> 
            </tr> 
            <tr>
              <td height="42" bgcolor="#FFFFCC"><strong>E-Posta Adresiniz:</strong></td>
              <td><input name="eposta2" type="text" id="eposta2" value="<? echo $uyeeposta; ?>" /></td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr> 
              <td height="42" bgcolor="#FFFFCC"><strong>Cep Telefonunuz:</strong></td> 
              <td><input name="eposta3" type="text" id="eposta3" value="<? echo $uyetel; ?>" /></td> 
              <td>&nbsp;</td> 
              <td>&nbsp;</td> 
            </tr> 
            <tr> 
              <td height="39" bgcolor="#FFFFCC"><strong>Adresiniz:</strong></td> 
              <td><textarea name="adres" cols="45" rows="10" id="adres"><? echo $uyeadres; ?></textarea></td> 
              <td>&nbsp;</td> 
              <td>&nbsp;</td> 
            </tr> 
            <tr> 
              <td height="39" bgcolor="#FFFFCC"><span class="style11">Doğum Tarihiniz:</span></td> 
              <td><select name="gun" id="gun"> 
            <? for($g = 01 ; $g < 32 ; $g++) {?> 
            <option value=" <?=$g ?>"> 
              <?=$g ?> 
              </option> 
            <? } ?> 
          </select> 
            <select name="ay" id="ay"> 
              <? for($a = 01 ; $a < 13 ; $a++) {?> 
              <option value="<?=$a ?>"> 
                <?=$a ?> 
              </option> 
              <? } ?> 
            </select> 
            <select name="yil" id="yil"> 
              <? for($y = 1940 ; $y < 2011 ; $y++) {?> 
              <option value="<?=$y ?>"> 
                <?=$y ?> 
              </option> 
              <? } ?> 
          </select></td> 
              <td>&nbsp;</td> 
              <td>&nbsp;</td> 
            </tr> 
            <tr> 
              <td height="39" bgcolor="#FFFFCC"><strong>Cinsiyetiniz:</strong></td> 
              <td>&nbsp;</td> 
              <td>&nbsp;</td> 
              <td> </td> 
            </tr> 
            <tr> 
              <td height="39">&nbsp;</td> 
              <td align="right"> 
                <input style="font-family: Tahoma; font-size: 8pt; color: #FFFFFF; font-weight: bold; border: 1px solid #000000; height:40; width:100; background-color: #ff8400" type="submit" name="kaydet" id="kaydet" value="Kaydet" />        </td> 
              <td colspan="2"><a href="cikis.php">Güvenli Çıkış</a>         </td> 
              </tr> 
          </table>  
        </div></td> 
        <td width="1">&nbsp;</td> 
        </tr> 
      <tr> 
        <td valign="top">&nbsp;</td> 
        <td>&nbsp;</td> 
      </tr> 
      <tr> 
        <td valign="top">&nbsp;</td> 
        <td>&nbsp;</td> 
      </tr> 
      <tr> 
        <td valign="top">&nbsp;</td> 
        <td>&nbsp;</td> 
      </tr> 
    </table> 
    </form>  
    </body> 
    </html>
    Session u kayıt edip daha sonra burdan okuyorum echo ile yazdırıyorum onda sorun yok görüyor üye bilgileri ama güncelleme kısmında hata veriyor bir bakarmısınız güncelleme olayındada mı session ile ilgili birşeyler kullanmam gerekiyor ?
  • 21-03-2010, 23:39:05
    #4
    Herhangi bir hata görüntülüyorsanız hatayı yazabilir misiniz?
  • 21-03-2010, 23:45:04
    #5
    Zaten hatayı görüntülemek için kod echo yazdım hata verirse die oralarda veriyor.

    burda hata
    Notice: Undefined index: ykuladi in c:\program files\easyphp1-8\www\saatborsasi\bilgidegis.php on line 87

    Notice: Undefined index: ysifre in c:\program files\easyphp1-8\www\saatborsasi\bilgidegis.php on line 88
    burdada hata
  • 21-03-2010, 23:48:06
    #6
    Üyeliği durduruldu
    $sorgu .= "set ykuladi = '$kuladi', ysifre = '$sifre' WHERE uyeno = $uyeno";
    sutunlarda hata olabilir
  • 21-03-2010, 23:50:39
    #7
    $sorgu = "SELECT * FROM uyeler WHERE uyeno = '$uyeno'";
    $sorgula = mysql_query($sorgu) or $hata = "Şifre Değişikliği (15)";
    echo"burda hata";

    burdada hata veriyor neden :S
  • 21-03-2010, 23:52:13
    #8
    Üyeliği durduruldu
    post ile gelen değerleri aekrana basın deneyin hepsi geliyormu.
    yine hata verirse sayfa başına
    error_reporting(E_ALL ^ E_NOTICE);
    ekleyin
    yine hata verrise post ların başına @ hata bastırma kodu koyun
  • 21-03-2010, 23:54:52
    #9
    İyide bilgileri güncelleme işlemini yapmadıktan sonra hatayı gizlesek neye yarayacak :S