0
<?php
include("../../config/database_connection.php");

if( isset($_POST) )
{
    $user_name   =$_POST['user_name'];
    $email   = $_POST['email'];
    $user_pass_init    = $_POST['password'];
    $user_pass_conf = $_POST['passconfirm'];
    $full_name = $_POST['full_name'];
    $gender = $_POST['gender'];

    if ($user_name!="" && $email!="" && $full_name!="" && $gender!="") {
        if ($_POST['password']!= $_POST['passconfirm']) {
            header("location:../index.php?err= password do not match");
        }else{
            $query   = "INSERT into admin_users (user_name,email,user_pass,full_name,gender) VALUES('" . $user_name . "','" . $email . "','" . md5($user_pass_init) . "','" . $full_name . "','" . $gender . "')";
            $success = $conn->query($query);
        }

        if (!$success) {
            die("Couldn't enter data: ".$conn->error);
        } else{
            header("location:../index.php");
        }
    } else{
        header("location:../index.php?err= Enter all the fields");
    }
} else{
    header("location:../index.php?err= couldnot enter data");
}
?>

これは、2 つのパスワードが一致しているかどうかを確認するために実行しようとしているコードです...しかし、同じパスワードを入力すると、パスワードの値が一致しません。問題は何ですか? 解決するのを手伝ってください

4

1 に答える 1