require("common.php3");
$id=chop($id);
if(!isset($id))error("请输入要删除的用户ID !");
elseif($pwd $adminpass)error("管理员密码错误!");
else{
$data=dbmopen("class","w");
dbmdelete($data,$id);
dbmclose($data);
$data=dbmopen("password","w");
dbmdelete($data,$id);
dbmclose($data);
header("location:index.php3");
}
?>
4、公用文件common.php3
$adminpass="test";
function error($msg){
?>
同学录 出错
同学录 出错
出错原因:
请点这里返回上一页检查你的输入是否有误
[ 返回上一页 ]
style="font-size: 9pt"> Copyright 200x y10k .Allrights reserved.
}
?>
5、登陆文件login.php3
require("common.php3");
if($submit){
$id=chop($id);
if($id=="")error("请输入您的用户名称!");
else{
$dbm=dbmopen("password","r");
if(!dbmexists($dbm,$id))error("没有这个用户名称!");
else{
$pass=dbmfetch($dbm,$id);
if($pass==$password){
setcookie("login",$id,time()+31536000);
header("location:index.php3");
}else error("您的密码不对!如果忘记密码,请使用忘记密码功能!");
}
dbmclose($dbm);
}
}else{
?>
深圳中学2000届高中(12)班同学录:::版权所有:辛湜@深圳中学2000届高中(12)班
body {background: buttonface; border: 0;}
#titleBar {text-align: left;
width: 300;
height: 20px;
border: 0px solid navy; background: navy; color: white; font-family: verdana; font-size: 12px;
font-weight: bold;
padding: 3;
padding-left: 15;
z-index: 2;}
#box {width: 300;
border: 15px solid navy; border-top: 0; background: white; color: black; font-family: verdana; font-size: 12px;
padding: 5;
z-index: 1;}
table {width: 240; margin: 10px; margin-top: 20px;}
td {color: black; font-family: verdana; font-size: 12px;}
.textInput {background: white; color: black;
width: 160px;
border-top: 1px solid gray;
border-left: 1px solid gray;
border-right: 1px solid #eeeeee;
border-bottom: 1px solid #eeeeee;
}
.button {font-family: verdana; font-size: 12px; background: navy; color: white; border-width: 1px;}
.pos {width: 100%; height: 100%; text-align: center;}
-->
深圳中学2000届高中(12)班同学录
}
?>
以上就介绍了同学录怎么写 PHP+DBM的同学录程序2,包括了同学录怎么写方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
查看更多关于同学录怎么写PHP+DBM的同学录程序2的详细内容...