大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 技术开发 -> PHP专区 -> PHP+DBM的同学录程序(4)

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

时间: 2021-07-31 作者:daque

8、备案文献reg.php3 <? require("common.php3"); require("mail.php3"); if($submit){   if($id=="")error("请填写您的备案用户名!");   elseif(!eregi("^[0-9a-za_z]+$",$id))error("你的用户名不许含有其余字符!");   elseif($password=="")error("请填写您的暗号!");   elseif($password<>$password1)error("您的暗号填写不精确!");   elseif($name=="")error("请填写您的名字!");   elseif($mail=="")error("请填写您的邮件地方!");   else{     $dbm=dbmopen("class","w");     if(dbmexists($dbm,$id))error("这个用户名仍旧给旁人备案了!");     else{       $intro=nl2br($intro);       $data="$name|!:!|$nickname|!:!|$mail|!:!|$home|!:!|$oicq|!:!|$icq|!:!|$add|!:!|$tel|!:!|$birth|!:!|$job|!:!|$intro|!:!|$sex";       dbminsert($dbm,$id,$data);       $pwd=dbmopen("password","w");       dbminsert($pwd,$id,$password);     }     dbmclose($dbm);     $sendmsg="欢送备案《深圳国学2000届高级中学(12)班同窗录》n";     $sendmsg.="底下是您的备案消息:n";     $sendmsg.="用户名:$idn用户暗号;$passwordn";     $sendmsg.="=====================================================";     $sendmsg.="备案全名:$namen备案昵称:$nicknamen备案邮箱:$mailn网页地方:$homen";     $sendmsg.="您的oicq:$oicqn您的 icq:$icqn接洽地方:$addn接洽电话:$teln";     $sendmsg.="您的华诞:$birthn您的工作:$jobn您的性别;$sexn您的部分引见:n$intronn";     $sendmsg.="======================================================";     $sendmsg.="欢送备案《深圳国学2000届高级中学(12)班同窗录》";     $sendmsg.="登大陆址:http://5212.net/class/";     mail2("欢送备案《深圳国学2000届高级中学(12)班同窗录》",$sendmsg,$mail);     header("location:index.php3");   } }else{ ?><!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html><head><title>同窗委派户备案</title> <meta content="text/html; charset=utf8" http-equiv=content-type> <link rel="stylesheet" href="style.css"> <meta content="mshtml 5.00.2614.3500" name=generator> </head><body bgcolor="#ffffff" topmargin=0> <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>     <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="reg.php3"> <font color=#ffffff>备案同窗录</font></td>           </tr>           <tr>              <td align=middle bgcolor=#ffffff height=25 width=150>备案用户名: </td>             <td align=left bgcolor=#ffffff height=25 width=400>                <input class=stedit maxlength=10 name=id size=23>               *必需填写</td>           </tr>           <tr>              <td align=middle bgcolor=#ffffff height=25 width=121>您的暗号: </td>             <td align=left bgcolor=#ffffff height=25 width=486>                <input class=stedit maxlength=10 name=password size=23 type="password">               *必需填写 </td>           </tr>           <tr>              <td align=middle bgcolor=#ffffff height=25 width=121>反复暗号: </td>             <td align=left bgcolor=#ffffff height=25 width=486>                <input type="password" class="stedit" name="password1" size="23" value="">               *必需填写 </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>             </td>           </tr>           <tr>              <td align=middle bgcolor=#ffffff height=25 width=121>电子邮件: </td>             <td align=left bgcolor=#ffffff height=25 width=486>                <input class=stedit maxlength=30 name=mail size=23>               *必需填写 </td>           </tr>           <tr>              <td align=middle bgcolor=#ffffff height=25 width=121>您的oicq: </td>             <td align=left bgcolor=#ffffff height=25 width=486>                <input class=stedit maxlength=9 name=oicq size=23>             </td>           </tr>           <tr>              <td align=middle bgcolor=#ffffff height=25 width=121>您的网页: </td>             <td align=left bgcolor=#ffffff height=25 width=486>                <input class=stedit maxlength=50 name=home size=23 value="http://">             </td>           </tr>           <tr>              <td align=middle bgcolor=#ffffff height=25 width=121>您的 icq: </td>             <td align=left bgcolor=#ffffff height=25 width=486>                <input class=stedit maxlength=10 name=icq size=23>             </td>           </tr>           <tr>              <td align=middle bgcolor=#ffffff height=25 width=121>您的名字: </td>             <td align=left bgcolor=#ffffff height=25 width=486>                <input class=stedit maxlength=10 name=name size=23>               *必需填写 </td>           </tr>           <tr>              <td align=middle bgcolor=#ffffff height=25 width=121>您的电话: </td>             <td align=left bgcolor=#ffffff height=25 width=486>                <input class=stedit maxlength=20 name=tel size=23>             </td>           </tr>           <tr>              <td align=middle bgcolor=#ffffff height=25 width=121>出华诞期: </td>             <td align=left bgcolor=#ffffff height=25 width=486>                <input class=stedit maxlength=11 name=birth size=23>               *一致2000-10-10 </td>           </tr>           <tr>              <td align=middle bgcolor=#ffffff height=25 width=121>接洽地方: </td>             <td align=left bgcolor=#ffffff height=25 width=486>                <input class=stedit maxlength=50 name=add size=23>             </td>           </tr>           <tr>              <td align=middle bgcolor=#ffffff height=25 width=121>您的工作: </td>             <td align=left bgcolor=#ffffff height=25 width=486>                <select name="job">                 <option value="学 生">学 生</option>                 <option value="老 师">老 师</option>                 <option value="其 他">其 他</option>               </select>             </td>           </tr>           <tr>              <td align=middle bgcolor=#ffffff height=25 width=121>您的性别: </td>             <td align=left bgcolor=#ffffff height=25 width=486>                <select name="sex">                 <option value="俊  男">俊  男</option>                 <option value="靓  女">靓  女</option>                 <option value="其  他">其  他</option>               </select>             </td>           </tr>           <tr>              <td align=middle bgcolor=#ffffff height=25 width=121>部分简介: </td>             <td align=left bgcolor=#ffffff height=25 width=486>                <textarea class="stedit" name="intro" cols="40" rows="4"></textarea>             </td>           </tr>           <tr bgcolor=#ffedc8>              <td bgcolor=#ffffff colspan=2>                <div align="center">                  <input type="submit" name="submit" value="确认请求" class="stbtm">                                   <input type="reset" name="reset" value="备案重置" class="stbtm">               </div></form>             </td>           </tr>           </tbody>          </table>       </div></tr></tbody></table><br><tr><td></td></tr> </body> </html> <? } ?> 9、创造数据库的文献run.php3 <? $dbm=dbmopen("class","c"); dbmclose($dbm); $dbm=dbmopen("password","c"); dbmclose($dbm); ?> 

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.