• 01-05-2024, 18:59:47
    #1
    php scriptte admin paneline kullanıcı adı ve sıfreyı dogru yazıyorum başarılı diyor fakat yönlendirmiyor. yardımcı olacak varmı ?
  • 01-05-2024, 19:04:54
    #2
    Farklı tarayıcıdan veya gizli sekmeden denesene hocam
  • 01-05-2024, 19:05:26
    #3
    kodu atarsanız inceleyelim
  • 01-05-2024, 19:20:16
    #4
    akosetr adlı üyeden alıntı: mesajı görüntüle
    kodu atarsanız inceleyelim
    admin klasörü içerisinde login.php kodlarını aşağıya bırakıyorum hocam

    <?php include '../config.php' ; ?>
    <!doctype html>
    <html lang="tr">
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="author" content="SiteYazilim">
    <title>Metropol Web Yönetici Girişi</title>
    <link rel="stylesheet" href="css/sim.css">
    <link href="https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,100;0,200;0,300;0,4 00;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300 ;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="css/fet.css">
    <link rel="stylesheet" href="css/apex.css">
    <link rel="stylesheet" href="css/light.css" id="lightTheme">
    <link rel="stylesheet" href="css/dark.css" id="darkTheme" disabled>
    </head>



    <body class="light ">
    <div class="wrapper vh-100">
    <div class="row align-items-center h-100 no-gutters">
    <form action="" method="post" class="col-lg-3 col-md-4 col-10 mx-auto text-center">
    <font style="color:#202020; font-size:24px;"><b>Metropol Web</b>Yönetici Girişi</font><br><br>


    <?php



    /* Giriş Yap */

    if (isset($_POST["loginol"])) {
    $email =$_POST["mail"];
    $pass =$_POST["pass"];
    $kullanicivarmi= $vt->prepare("select * from kullanicilar where email=? && pass=?");
    $kullanicivarmi->execute(array($email,$pass));
    $row= $kullanicivarmi->rowCount();
    if ($row>0) {
    $_SESSION["mail"]=$email;
    $_SESSION["pass"]=$pass;

    echo' <META HTTP-EQUIV="Refresh" content="2;URL=index"> <div style="width:100%; color:white; font-size:12px;" class="btn btn-success btn-inline">
    <strong>Başarılı!</strong> <span>Bilgileriniz doğru</span>
    </div><br><br>' ;

    }else{
    echo' <META HTTP-EQUIV="Refresh" content="3;URL=index"><div style="width:100%; font-size:12px;" class="btn btn-danger btn-inline">
    <strong>Hata!</strong> <span>Bilgiler yanlış tekrar deneyiniz</span>
    </div><br><br>' ;
    }
    }
    ?>

    <div class="form-group">
    <label for="inputEmail" class="sr-only">Email address</label>
    <input type="email" name="mail" class="form-control form-control-lg" placeholder="E-Mail Adresi" style="font-size:13px;" required="" autofocus="">
    </div>
    <div class="form-group">
    <label for="inputPassword" class="sr-only">Password</label>
    <input type="password" name="pass" class="form-control form-control-lg" placeholder="Hesap Şifresi" style="font-size:13px;" required="">
    </div>

    <button class="btn btn-lg btn-primary btn-block" name="loginol" type="submit">Giriş Yap</button>
    <p class="mt-5 mb-3 text-muted">© 2024 - Metropol Web</p>

    </form>
    </div>
    </div>
  • 01-05-2024, 19:39:57
    #5
    gokhanavci01 adlı üyeden alıntı: mesajı görüntüle
    admin klasörü içerisinde login.php kodlarını aşağıya bırakıyorum hocam

    <?php include '../config.php' ; ?>
    <!doctype html>
    <html lang="tr">
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="author" content="SiteYazilim">
    <title>Metropol Web Yönetici Girişi</title>
    <link rel="stylesheet" href="css/sim.css">
    <link href="https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,100;0,200;0,300;0,4 00;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300 ;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="css/fet.css">
    <link rel="stylesheet" href="css/apex.css">
    <link rel="stylesheet" href="css/light.css" id="lightTheme">
    <link rel="stylesheet" href="css/dark.css" id="darkTheme" disabled>
    </head>



    <body class="light ">
    <div class="wrapper vh-100">
    <div class="row align-items-center h-100 no-gutters">
    <form action="" method="post" class="col-lg-3 col-md-4 col-10 mx-auto text-center">
    <font style="color:#202020; font-size:24px;"><b>Metropol Web</b>Yönetici Girişi</font><br><br>


    <?php



    /* Giriş Yap */

    if (isset($_POST["loginol"])) {
    $email =$_POST["mail"];
    $pass =$_POST["pass"];
    $kullanicivarmi= $vt->prepare("select * from kullanicilar where email=? && pass=?");
    $kullanicivarmi->execute(array($email,$pass));
    $row= $kullanicivarmi->rowCount();
    if ($row>0) {
    $_SESSION["mail"]=$email;
    $_SESSION["pass"]=$pass;

    echo' <META HTTP-EQUIV="Refresh" content="2;URL=index"> <div style="width:100%; color:white; font-size:12px;" class="btn btn-success btn-inline">
    <strong>Başarılı!</strong> <span>Bilgileriniz doğru</span>
    </div><br><br>' ;

    }else{
    echo' <META HTTP-EQUIV="Refresh" content="3;URL=index"><div style="width:100%; font-size:12px;" class="btn btn-danger btn-inline">
    <strong>Hata!</strong> <span>Bilgiler yanlış tekrar deneyiniz</span>
    </div><br><br>' ;
    }
    }
    ?>

    <div class="form-group">
    <label for="inputEmail" class="sr-only">Email address</label>
    <input type="email" name="mail" class="form-control form-control-lg" placeholder="E-Mail Adresi" style="font-size:13px;" required="" autofocus="">
    </div>
    <div class="form-group">
    <label for="inputPassword" class="sr-only">Password</label>
    <input type="password" name="pass" class="form-control form-control-lg" placeholder="Hesap Şifresi" style="font-size:13px;" required="">
    </div>

    <button class="btn btn-lg btn-primary btn-block" name="loginol" type="submit">Giriş Yap</button>
    <p class="mt-5 mb-3 text-muted">© 2024 - Metropol Web</p>

    </form>
    </div>
    </div>
    sweet alert kullanın hocam tepkilerde birde header veya refresh yerine

    echo "<script>window.location.href='index ';</script>"; kullanını
  • 01-05-2024, 19:48:02
    #6
    session_start(); kodunu en includeden sonra php taglarına ekleyin