• 27-12-2012, 01:45:06
    #1
    Üyeliği durduruldu
    Arkadaşlar merhaba 2 adet php dosyam mevcut ilk dosyada kullanıcı adı ve email bilgilerinin alınacağı form 2 dosyamda ise bu verilerin kaydedileceğ php dosyası

    ama sorunum şu ki ; Formdan kullanıcı adı ve emaili giriyorum herşey güzel ekliyor ama sonrasında boş bir kayıt daha ekliyor aynı resimdeki gibi



    ve not : bu olay sadece chrome'de böyle oluyor, çerezleri sildim,pc'i yeniden başlattım ama hala aynı.

    index.php dosyam
    <?php include("config.php"); ?>
    <!DOCTYPE HTML>
    <html lang="en-US">
    <head>
    	<meta charset="UTF-8">
    	<title></title>
    </head>
    <body>
    	<form action="kaydet.php" method="post">
    	Kullanıcı Adı : <input type="text" name="kullaniciAdi" />
    	<br/>
    	Email : <input type="text" name="email" />
    	<br/>
    	<input type="submit" value="Değerleri Kaydet" />
    	</form>
    </body>
    </html>
    kaydet.php dosyam
    <?php
    	include("config.php");
    	$kullaniciAdi = $_POST["kullaniciAdi"];
    	$email		  =	$_POST["email"];
    
    	$ekle			=	mysql_query("INSERT INTO uyeler (username,email) values ('$kullaniciAdi','$email')");
    	if($ekle{
    	echo "Kayit eklendi";
    	}else{
    	echo "Kayit eklenemedi.";
    	}
    ?>


    --R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 01:45:06 -->-> Daha önceki mesaj 01:22:22 --

    Arkadaşlar Romansanta çok sağolsun sorunumu çözdü
  • 27-12-2012, 02:30:31
    #2
    Alıntı
    <?php
    include("config.php");
    $kullaniciAdi = $_POST["kullaniciAdi"];
    $email = $_POST["email"];
    if($kullaniciAdi!="" and $email!="" ){
    $ekle = mysql_query("INSERT INTO uyeler (username,email) values ('$kullaniciAdi','$email')");
    if($ekle{
    echo "Kayit eklendi";
    }else{
    echo "Kayit eklenemedi.";
    }}
    ?>
    olarak günclle