PHP, 간단한 도서 대출 시스템의 사용자 등록 페이지 개발
이 섹션에서는 먼저 등록된 프런트 엔드 페이지
를 생성하여 HTML 페이지의 데이터베이스 테이블에 생성한 필드를 표시합니다.
<양식> 양식과 <테이블>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <form name="form1" method="post" action="" enctype='multipart/form-data' onSubmit="return checkreg()" > <table width="782" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC"> <tr> <th colspan="2" bgcolor="#FFFFFF"><font size="5">用 户 注 册 界 面</font></th> </tr> <tr> <td width="364" align="right" bgcolor="#FFFFFF">姓 名:</td> <td width="403" bgcolor="#FFFFFF"> <input type="text" name="name"> </tr> <tr> <td align="right" bgcolor="#FFFFFF">密 码:</td> <td bgcolor="#FFFFFF"> <input type="password" name="password"> </tr> <tr> <td align="right" bgcolor="#FFFFFF">确认密码:</td> <td bgcolor="#FFFFFF"> <input type="password" name="pwd"> </tr> <tr> <td align="right" bgcolor="#FFFFFF">Email:</td> <td bgcolor="#FFFFFF"> <input type="text" name="email"> </tr> <tr> <td align="right" bgcolor="#FFFFFF">电 话:</td> <td bgcolor="#FFFFFF"> <input type="text" name="tel"> </tr> <tr> <td align="right" bgcolor="#FFFFFF">地 址:</td> <td bgcolor="#FFFFFF"> <input type="text" name="address"> </tr> <tr> <td align=right bgcolor="#FFFFFF" > <input type="submit" name="submit" value="注 册"> </td> <td align=left bgcolor="#FFFFFF"> <input type="reset" name="submit" value="重 写"> </td> </tr> </table> </form>
전체 등록 페이지 파일 reg.php 코드:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>图书系统注册页面</title> <style> body,td,th {font-family: 微软雅黑;font-size: 9px;color: #222;} body {background-color: #FFFFFF;line-height:20px;} a:link {color: #222;text-decoration: none;} a:visited {text-decoration: none;color: #222;} a:hover {text-decoration: underline;color: #FF0000;} a:active {text-decoration: none;color: #999999;} </style> </head> <body> <form name="form1" method="post" action="" enctype='multipart/form-data' onSubmit="return checkreg()" > <table width="" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC"> <tr> <th colspan="2" bgcolor="#FFFFFF"><font size="5">用 户 注 册 界 面</font></th> </tr> <tr> <td width="100px" align="right" bgcolor="#FFFFFF">姓 名:</td> <td width="100px" bgcolor="#FFFFFF"> <input type="text" name="name"> </tr> <tr> <td align="right" bgcolor="#FFFFFF">密 码:</td> <td bgcolor="#FFFFFF"> <input type="password" name="password"> </tr> <tr> <td align="right" bgcolor="#FFFFFF">确认密码:</td> <td bgcolor="#FFFFFF"> <input type="password" name="pwd"> </tr> <tr> <td align="right" bgcolor="#FFFFFF">Email:</td> <td bgcolor="#FFFFFF"> <input type="text" name="email"> </tr> <tr> <td align="right" bgcolor="#FFFFFF">电 话:</td> <td bgcolor="#FFFFFF"> <input type="text" name="tel"> </tr> <tr> <td align="right" bgcolor="#FFFFFF">地 址:</td> <td bgcolor="#FFFFFF"> <input type="text" name="address"> </tr> <tr> <td align=right bgcolor="#FFFFFF" > <input type="submit" name="submit" value="注 册"> </td> <td align=left bgcolor="#FFFFFF"> <input type="reset" name="submit" value="重 写"> </td> </tr> </table> </form> </body> </html>