/*
* PHP100Job v1.0
* Programmer : Msn/QQ haowubai@hotmail.com (925939)
* www.php100.com Develop a project PHP - MySQL - Apache
* Window 2003 - Preferences - PHPeclipse - PHP - Code Templates
*/
include("conn.php");
if($_GET[out]){
setcookie("cookie", "out");
echo "";
}
if($_POST[id]=='admin'){
$pw=md5($_POST[pw]);
if($pw=='e1bfd762321e409cee4ac0b6e841963c'){
setcookie("cookie", "ok");
echo "";
}
}
include("head.php");
if($_COOKIE['cookie']!='ok'){
?>
function Checklogin()
{
if (myform.id.value=="")
{
alert("请填写登录名");
myform.id.focus();
return false;
}
if (myform.pw.value=="")
{
alert("密码不能为空");
myform.pw.focus();
return false;
}
}
ID:
PW:
}else{
?>
退出
//就是给当前页面提交一个参数, 参数名为'out' ,参数值为login
}
?>