header( 'Content-Type:text/html;charset=utf-8 ');
session_start();
include_once("conn/conn.php");
$name=$_POST["username"];
$pass=$_POST["password"];
$sql="SELECT * from user where username='$name' and password='$pass'";
$r=mysqli_query($link,$sql);
$n=mysqli_num_rows($r);
if($r>0){
header('location:welcome.html');
}else{
echo "<script>alert('账号或密码错误');location.href='index1.php';</script>";
}