PHP+DBM's Alumni Program (3) _php Foundation

Source: Internet
Author: User
6, log out the document 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 ("Please fill in your name!") ");
ElseIf ($mail = = "") Error ("Please fill in 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><HEAD><TITLE> Alumni User Modification Information </TITLE>
<meta content= "text/html; charset=gb2312 "http-equiv=content-type>
<link rel= "stylesheet" href= "Style.css" >
<table border=0 cellpadding=0 cellspacing=0 width= "100%" ><BR>
<div align=center></div><center><tbody></tbody></center>
</TABLE>
<table border=0 cellpadding=0 cellspacing=0 width= "60%" align= "Center" >
<TBODY> <tr valign=top>
&LT;TD bgcolor= #000000 width= "100%" height= "336" >
<div align=center>
<table border=0 cellpadding=4 cellspacing=1 height=390 width=586>
<TBODY>
<TR>
&LT;TD align=middle bgcolor= #2f5e8c colspan=2 height=14 valign=top><form method= "POST" action= "modify.php3" > <font color= #ffffff > Modification Information-Alumni <?echo$login;? ></FONT></TD>
</TR>
<tr>
&LT;TD align=middle bgcolor= #ffffff height=25 width=121>nickname: </td>
&LT;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>
&LT;TD align=middle bgcolor= #ffffff height=25 width=121> Email: </TD>
&LT;TD align=left bgcolor= #ffffff height=25 width=486>
<input class=stedit maxlength=30 name=mail size=23 value=<?echo$info[2];? >>
* Must fill in </TD>
</TR>
<tr>
&LT;TD align=middle bgcolor= #ffffff height=25 width=121> your OICQ: </td>
&LT;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>
&LT;TD align=middle bgcolor= #ffffff height=25 width=121> your homepage: </td>
&LT;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>
&LT;TD align=middle bgcolor= #ffffff height=25 width=121> your ICQ: </td>
&LT;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>
&LT;TD align=middle bgcolor= #ffffff height=25 width=121> your name: </td>
&LT;TD align=left bgcolor= #ffffff height=25 width=486>
<input class=stedit maxlength=10 name=name size=23 value=<?echo$info[0];? >>
* Must fill in </td>
</tr>
<tr>
&LT;TD align=middle bgcolor= #ffffff height=25 width=121> your phone: </td>
&LT;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>
&LT;TD align=middle bgcolor= #ffffff height=25 width=121> Date of birth: </td>
&LT;TD align=left bgcolor= #ffffff height=25 width=486>
<input class=stedit maxlength=11 Name=birth size=23 value=<?echo$info[8];? >>
* Similar 2000-10-10 </td>
</tr>
<tr>
&LT;TD align=middle bgcolor= #ffffff height=25 width=121> Contact Address: </td>
&LT;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>
&LT;TD align=middle bgcolor= #ffffff height=25 width=121> your career: </td>
&LT;TD align=left bgcolor= #ffffff height=25 width=486>
<select name= "Job" >
<option value= "Student" > Student </option>
<option value= "Teacher" > Teacher </option>
<option value= "Other" > Other </option>
</select>
</td>
</tr>
<tr>
&LT;TD align=middle bgcolor= #ffffff height=25 width=121> your gender: </td>
&LT;TD align=left bgcolor= #ffffff height=25 width=486>
<select name= "Sex" >
<option value= "Handsome" > Handsome boys </option>
<option value= "Pretty Girl" > Pretty girl </option>
<option value= "Other" > Other </option>
</select>
</td>
</tr>
<tr>
&LT;TD align=middle bgcolor= #ffffff height=25 width=121> profile: </td>
&LT;TD align=left bgcolor= #ffffff height=25 width=486>
<textarea class= "Stedit" name= "Intro" cols= "" rows= "4" ><?echo$info[10];? ></textarea>
</td>
</tr>
<tr bgcolor= #ffedc8 >
&LT;TD bgcolor= #ffffff colspan=2>
<div align= "center" >
<input type= "Submit" name= "Submit" value= "Confirm modification" class= "STBTM" >

<input type= "reset" name= "reset" value= "Reset Info" class= "STBTM" >
</div></form>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV></TR></TBODY></TABLE><BR><TR><TD></TD></TR>
</BODY>
</HTML>
?
}
?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.