这是我的密码
<?php
$con = mysqli_connect("localhost","root","","system_database");
if(isset($_POST['Submit'])){
$Username = trim($_POST['Username']);
$password = trim($_POST['password']);
// encrypt password before submiting it
$password_encrypted = crypt($password, 'is'); // "is" is the salt
$sql = "SELECT * FROM register WHERE Username = '$Username' AND password='$password_encrypted'";
$query = $con -> query($sql);
$result = mysqli_num_rows($query);
if($result == true){
header ("location: report.php");
} else {
echo "username or password wrong";
}
}
?>
1条答案
按热度按时间webghufk1#
像这样添加