Timuçib
Hectopat
- Katılım
- 8 Mart 2023
- Mesajlar
- 1.395
- Çözümler
- 13
PHP bilen aşağıdaki kod satırından az çok ne yapmak istediğimi anlamıştır maalesef buradan anlatmak çok zor fakat password_verify($password,$aboutpassword) sorgusu doğru olsa bile hiçbir şekilde tutmuyor else çalışıyor sürekli hata nerede?
Kod:
<?php
$connect = mysqli_connect("localhost","root","","udata");
mysqli_set_charset($connect, "UTF8");
$luser = $_POST["f_l_name"];
$password = $_POST["f_l_password"];
$lbtn = $_POST["f_l_btn"];
if (isset($luser) && isset($password) )
{
$select = "SELECT * FROM user WHERE username ='$luser'";
$run = mysqli_query($connect, $select);
$registernum = mysqli_num_rows($run);
if ( $registernum > 0 )
{
$aboutregister = mysqli_fetch_assoc($run);
$aboutpassword=$aboutregister['password'];
if (password_verify($password,$aboutpassword)) <-- Bahsi geçen sorgu
{
header("location:index.php");
}
else <-- Bahsi geçen else
{
echo "<div class='userno'><br><b>   Password False</b></div>";
}
}
else
{
echo "<div class='userno'><br><b>   User name false</b></div>";
}
}