<?php
header('content-type:text/html;charset=utf-8');
if(isset($_post['submit'])){
$username = $_post['username'];
$password = $_post['password'];
if(empty($username)||empty($password)){
header('Refresh:3;url=login.php');
echo '用户名密码不能为空';
exit;
}
}else{
include_once 'templates/login.html';
}
?>
I found the problem, it is that the PHP variables are not case sensitive