6. log out of the logout. php3 file.
<?
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 );
?>
<! Doctype HTML public "-// W3C // dtd html 4.0 transitional // en">
<HTML> <Meta content = "text/html; charset = gb2312" http-equiv = Content-Type>
<LINK rel = "stylesheet" href = "style.css">
</Head> <body bgcolor = "# ffffff" topmargin = 0>
<Table border = 0 cellpadding = 0 cellspacing = 0 width = "100%"> <br>
<Div align = center> </div> <center> <tbody> </center>
</Table>
<Table border = 0 cellpadding = 0 cellspacing = 0 width = "60%" align = "center">
<Tbody> <tr valign = top>
<TD bgcolor = #000000 width = "100%" Height = "336">
<Div align = center>
<Table border = 0 cellpadding = 4 cellspacing = 1 Height = 390 width = 586>
<Tbody>
<Tr>
<TD align = middle bgcolor = # 2f5e8c colspan = 2 Height = 14 valign = top> <form method = "Post" Action = "modify. php3 "> <font color = # ffffff> modify information-Logon record <? Echo $ login;?> </Font> </TD>
</Tr>
<Tr>
<TD align = middle bgcolor = # ffffff Height = 25 width = 121> nickname: </TD>
<TD align = left bgcolor = # ffffff Height = 25 width = 486>
<Input class = stedit maxlength = 20 name = nickname size = 23 value = <? Echo $ info [1];? >>>
</TD>
</Tr>
<Tr>
<TD align = middle bgcolor = # ffffff Height = 25 width = 121> Email: </TD>
<TD align = left bgcolor = # ffffff Height = 25 width = 486>
<Input class = stedit maxlength = 30 name = Mail size = 23 value = <? Echo $ info [2];? >>
* Required </TD>
</Tr>
<Tr>
<TD align = middle bgcolor = # ffffff Height = 25 width = 121> your OICQ: </TD>
<TD align = left bgcolor = # ffffff Height = 25 width = 486>
<Input class = stedit maxlength = 9 name = OICQ size = 23 value = <? Echo $ info [4];? >>
</TD>
</Tr>
<Tr>
<TD align = middle bgcolor = # ffffff Height = 25 width = 121> your home page: </TD>
<TD align = left bgcolor = # ffffff Height = 25 width = 486>
<Input class = stedit maxlength = 50 name = home size = 23 value = "<? Echo $ info [3];?> ">
</TD>
</Tr>
<Tr>
<TD align = middle bgcolor = # ffffff Height = 25 width = 121> your ICQ: </TD>
<TD align = left bgcolor = # ffffff Height = 25 width = 486>
<Input class = stedit maxlength = 10 name = ICQ size = 23 value = <? Echo $ info [5];? >>>
</TD>
</Tr>
<Tr>
<TD align = middle bgcolor = # ffffff Height = 25 width = 121> your name: </TD>
<TD align = left bgcolor = # ffffff Height = 25 width = 486>
<Input class = stedit maxlength = 10 name = Name size = 23 value = <? Echo $ info [0];? >>
* Required </TD>
</Tr>
<Tr>
<TD align = middle bgcolor = # ffffff Height = 25 width = 121> your phone number: </TD>
<TD align = left bgcolor = # ffffff Height = 25 width = 486>
<Input class = stedit maxlength = 20 name = Tel size = 23 value = <? Echo $ info [7];? >>>
</TD>
</Tr>
<Tr>
<TD align = middle bgcolor = # ffffff Height = 25 width = 121> Date of birth: </TD>
<TD align = left bgcolor = # ffffff Height = 25 width = 486>
<Input class = stedit maxlength = 11 name = birth size = 23 value = <? Echo $ info [8];? >>
* Similar to 2000-10-10 </TD>
</Tr>
<Tr>
<TD align = middle bgcolor = # ffffff Height = 25 width = 121> contact address: </TD>
<TD align = left bgcolor = # ffffff Height = 25 width = 486>
<Input class = stedit maxlength = 50 name = add size = 23 value = <? Echo $ info [6];? >>>
</TD>
</Tr>
<Tr>
<TD align = middle bgcolor = # ffffff Height = 25 width = 121> your career: </TD>
<TD align = left bgcolor = # ffffff Height = 25 width = 486>
<Select name = "job">
<Option value = ""> Student </option>
<Option value = ""> </option>
<Option value = "value"> </option>
</SELECT>
</TD>
</Tr>
<Tr>
<TD align = middle bgcolor = # ffffff Height = 25 width = 121> your gender: </TD>
<TD align = left bgcolor = # ffffff Height = 25 width = 486>
<Select name = "sex">
<Option value = "Jun male"> Jun male </option>
<Option value = "pretty girl"> pretty girl </option>
<Option value = "value"> </option>
</SELECT>
</TD>
</Tr>
<Tr>
<TD align = middle bgcolor = # ffffff Height = 25 width = 121> Personal Profile: </TD>
<TD align = left bgcolor = # ffffff Height = 25 width = 486>
<Textarea class = "stedit" name = "Intro" Cols = "40" rows = "4"> <? Echo $ info [10];?> </Textarea>
</TD>
</Tr>
<Tr bgcolor = # ffedc8>
<TD bgcolor = # ffffff colspan = 2>
<Div align = "center">
<Input type = "Submit" name = "Submit" value = "confirm to modify" class = "stbtm">
<Input type = "reset" name = "reset" value = "Reset information" class = "stbtm">
</Div> </form>
</TD>
</Tr>
</Tbody>
</Table>
</Div> </tr> </tbody> </table> <br> <tr> <TD> </tr>
</Body>
</Html>
<?
}
?>