Home > Backend Development > PHP Tutorial > PHP+DBM的同学录程序(3)

PHP+DBM的同学录程序(3)

WBOY
Release: 2016-06-01 14:30:32
Original
753 people have browsed it
6、登出文件logout.php3

setcookie("login",false,time()+31536000);
header("location:login.php3");
?>

7、修改信息文件modify.php3

require("common.php3");
$id=$login;
if($submit){
 if($name=="")error("请填写您的名字!");
 elseif($mail=="")error("请填写您的邮件地址!");
 else{
  $dbm=dbmopen("class","w");
  $intro=nl2br($intro);
  $data="$name|!:!|$nickname|!:!|$mail|!:!|$home|!:!|$oicq|!:!|$icq|!:!|$add|!:!|$tel|!:!|$birth|!:!|$job|!:!|$intro|!:!|$sex";
  dbmreplace($dbm,$id,$data);
  dbmclose($dbm);
  header("Location:index.php3");
 }
}else{
    $dbm=dbmopen("class","r");
    $data=dbmfetch($dbm,$login);
  $info=explode("|!:!|",$data);
  dbmclose($dbm);
?>

同学录用户修改信息






Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template