<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN" dir="ltr">
<head profile="http://gmpg.org/xfn/11">
<title>Login [example]</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="imagetoolbar" content="no" />
</head>
<?php
function userauth( $user, $passwd ) {
//TODO: 在这里应该连接数据库验证用户
if($user=="test"&&$passwd=="0000")return true;
else return false;
}
?>
<body id="top">
<?php
if( $_SERVER['REQUEST_METHOD']!='POST' ){
//确认这是一个GET请求,而不是POST请求。
?>
<!-- <form action="/login.php?next=
[PHP]登录表单例程
最新推荐文章于 2023-06-14 16:27:45 发布