• 21-08-2021, 19:46:02
    #1
    Merhaba temada giriş bölümünde md5 yerine hash kodlu giriş yapmayı nasıl sağlayabilirim yardımcı olurmusunuz

    Örnek bu kod ile : $2y$10$CXIDBjMYoNeWYJ55Lxi17eaoG2FTIO1X9I96npMqJsc goV1qRVNOa
    
     if (isset($_POST["loginol"])) {
            $email  =$_POST["mail"];
             $password   =md5($_POST["password"]);
              $kullanicivarmi= $vt->prepare("select * from uye where email=? && password=?");
              $kullanicivarmi->execute(array($email,$password));
              $row= $kullanicivarmi->rowCount();
              if ($row>0) {
                $_SESSION["mail"]=$email;
                $_SESSION["password"]=$password;
                echo' <META HTTP-EQUIV="Refresh" content="2;URL=loginoldu.php/"> ' ;
              }else{
               echo' <META HTTP-EQUIV="Refresh" content="2;URL=login.php">' ;
              }
          }
  • 21-08-2021, 19:48:30
    #2
    Aman diyeyim session'da şifre tutmayın.
  • 21-08-2021, 19:52:09
    #3
    Giriş sayfanızda get oluşturup gönderebilirsiniz. $_GET["loginhash"];

    <input type="hidden" name="loginhash" value="$2y$10$CXIDBjMYoNeWYJ55Lxi17eaoG2FTIO1X9I96npMqJsc goV1qRVNOa"/>
    $password   =  $_GET["loginhash"]
  • 21-08-2021, 19:54:06
    #4
    $hash = '$2y$07$BCryptRequires22Chrcte/VlQH0piJtjXl.0t1XkA8pw9dMXTpOq';
    
    if(password_verify('yazilansifre', $hash)) {
        echo 'Parola geçerli!';
    } else {
        echo 'Geçersiz parola.';
    }
  • 21-08-2021, 19:55:27
    #5
    Botman, Codemaster
    ereneser adlı üyeden alıntı: mesajı görüntüle
    Merhaba temada giriş bölümünde md5 yerine hash kodlu giriş yapmayı nasıl sağlayabilirim yardımcı olurmusunuz

    Örnek bu kod ile : $2y$10$CXIDBjMYoNeWYJ55Lxi17eaoG2FTIO1X9I96npMqJsc goV1qRVNOa
    
     if (isset($_POST["loginol"])) {
            $email  =$_POST["mail"];
             $password   =md5($_POST["password"]);
              $kullanicivarmi= $vt->prepare("select * from uye where email=? && password=?");
              $kullanicivarmi->execute(array($email,$password));
              $row= $kullanicivarmi->rowCount();
              if ($row>0) {
                $_SESSION["mail"]=$email;
                $_SESSION["password"]=$password;
                echo' <META HTTP-EQUIV="Refresh" content="2;URL=loginoldu.php/"> ' ;
              }else{
               echo' <META HTTP-EQUIV="Refresh" content="2;URL=login.php">' ;
              }
          }
    $sifre = $_GET['password']
    $hash_s= password_hash($sifre , PASSWORD_DEFAULT);
    OKUMA ;

    if(password_verify([COLOR=var(--highlight-variable)][FONT=inherit][SIZE=2]$sifre_string[/SIZE][/FONT][/COLOR], [COLOR=var(--highlight-variable)][FONT=inherit]$hash_sifre[/FONT][/COLOR]){    
    echo "Sifre dogru.";
    }
  • 21-08-2021, 20:06:51
    #6
    Değerli yorumlarınız için cok teşekkürler şuanda deniyorum @HelixTm; @LeftSoft; @ibocum;