• 14-04-2008, 14:52:34
    #10
    Kod zaten öyle

    Alıntı
    <?php
    ob_start();
    if (!empty($_POST[kullaniciadi]) and !empty($_POST[sifre])) {
    @mysql_connect ("localhost", "baksakne_kurs", "kurs") or die ("MySQL'e baglanilamadi");
    @mysql_select_db ("baksakne_kurs") or die ("Veritabanina baglanilamadi");

    $sql = "select * from uyeler where kullaniciadi='".$_POST[kullaniciadi]."' and sifre='".$_POST[sifre]."' ";
    $kontrol = mysql_query($sql);
    $kayitsayisi = mysql_num_rows($kontrol);

    if ($kayitsayisi == "0") {
    header ("Location: uyegirisi.php?hata=yes");
    } else {
    $kontrol_ok = mysql_fetch_array($kontrol);
    setcookie ("kullanici", "$kontrol_ok[kullaniciadi]");
    header ("Location: index.php");
    }

    }
    else {
    header ("Location: uyegirisi.php?hata=yes");
    }
    ob_end_flush();
    ?>
  • 14-04-2008, 15:19:05
    #11
    verdigin kodda bir header hatasi yok. yönlendirmeyi basarili sekilde yapiyor.
  • 14-04-2008, 17:26:10
    #12
    dENERSENiz görürsünüz YARDIM LÜTFEN
  • 14-04-2008, 18:12:09
    #13
    denedim kendi hostumda hata vermeden yönlendirdi

    http://www.lacremel.net/dene.php
  • 14-04-2008, 19:21:12
    #14
    benim sitede denermisin kullanıcı adı : mynet şifre : mynet
  • 14-04-2008, 19:29:57
    #15
    session_start(); eklimi kodlarinda ?
  • 14-04-2008, 19:35:31
    #16
    Ekli ve hata şu şekili aldı:

    Alıntı
    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/baksakne/public_html/kurs/uyegirisikontrol.php:1) in /home/baksakne/public_html/kurs/uyegirisikontrol.php on line 2

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/baksakne/public_html/kurs/uyegirisikontrol.php:1) in /home/baksakne/public_html/kurs/uyegirisikontrol.php on line 2

    Warning: Cannot modify header information - headers already sent by (output started at /home/baksakne/public_html/kurs/uyegirisikontrol.php:1) in /home/baksakne/public_html/kurs/uyegirisikontrol.php on line 15

    Warning: Cannot modify header information - headers already sent by (output started at /home/baksakne/public_html/kurs/uyegirisikontrol.php:1) in /home/baksakne/public_html/kurs/uyegirisikontrol.php on line 16
  • 14-04-2008, 19:41:25
    #17
    uyegirisikontrol.php son halini kopyalarmisin
  • 14-04-2008, 20:34:09
    #18
    Son Hali :

    Alıntı
    <?php
    session_start();
    ob_start();
    if (!empty($_POST[kullaniciadi]) and !empty($_POST[sifre])) {
    @mysql_connect ("localhost", "baksakne_kurs", "kurs") or die ("MySQL'e baglanilamadi");
    @mysql_select_db ("baksakne_kurs") or die ("Veritabanina baglanilamadi");

    $sql = "select * from uyeler where kullaniciadi='".$_POST[kullaniciadi]."' and sifre='".$_POST[sifre]."' ";
    $kontrol = mysql_query($sql);
    $kayitsayisi = mysql_num_rows($kontrol);

    if ($kayitsayisi == "0") {
    header ("Location: uyegirisi.php?hata=yes");
    } else {
    $kontrol_ok = mysql_fetch_array($kontrol);
    setcookie ("kullanici", "$kontrol_ok[kullaniciadi]");
    header ("Location: index.php");
    }

    }
    else {
    header ("Location: uyegirisi.php?hata=yes");
    }
    ob_end_flush();
    ?>