PHP + DBM logging program (3 ). 6. log out of the file logout. php3? Setcookie (login, false, time () + 31536000); header (location: login. php3 );? 7. modify the information file modify. php3? Require (common. php3); $ id $ login; if ($ submit 6. log out of the file logout. php3
Setcookie ("login", false, time () + 31536000 );
Header ("location: login. php3 ");
?>
7. modify the information file modify. php3
Require ("common. php3 ");
$ Id = $ login;
If ($ submit ){
If ($ name = "") error ("Enter your name! ");
Elseif ($ mail = "") error ("Enter your email address! ");
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 );
?>
Record user modification information
}
?>
Why? Setcookie (login, false, time () + 31536000); header (location: login. php3 );? 7. modify the information file modify. php3? Require (common. php3); $ id = $ login; if ($ submit...