if(!isset($_POST['submit'])){
exit('非法存取!');
}
$username=htmlspecialchars($_POST["使用者名稱"]);
var_dump($username);
$password=MD5 ( $_POST["密碼"]);
$con=mysqli_connect('localhost','root','greg1997714','ky');
if(mysqli_errno($con ) )
{
echo 'mysqli_error($con)';
exit;
}
$sql1="select user_name ,user_password from users where user_name='$username' limit=1";
$sql2="select user_name,user_password from users where user_name='$username' and user_password='$password' users where user_name='$username' and user_password='$password' limit=1 " ;
$result = mysqli_num_rows(mysqli_query($con,$sql1));
echo $result;
if($result)
# {
echo"";
退出;
mysqli_close($con);
}
$result = mysqli_num_rows(mysqli_query($con,$sql2));
if($result)
{
echo" ; ”;
exit;
mysqli_close($con);
}
echo"登陸成功!";
mysqli_close($con);
?>