手机站
网通分站
电信主站
密 码:
用户名:
当前位置 : 主页>网络编程>Php编程>列表

用户的详细注册和判断

来源:互联网 作者:west263.com 时间:2008-02-23
西部数码-全国虚拟主机10强!40余项虚拟主机管理功能,全国领先!双线多线虚拟主机南北访问畅通无阻!免费赠送企业邮局,.CN域名,自助建站480元起,免费试用7天,满意再付款! P4主机租用799元/月.月付免压金!
有三个文件:
第一是:zcyh.php(注册用户名)<?include("header1.inc.php")?>
<div align=center>
<table width="89%" border="0">
<tr>
<td><font color="#ff0000">当前位置:<a href="index.php">主页</a>&gt;&gt;注册页面</font></td>
</tr>
</table><br>

<table width="82%" border="0" height="27">
<tr>
<td height="14"><b><font color="#660099"><img src="images/dyb.gif" width="68" height="22">
请设定用户名:(<font color="#FF0000">3-15位</font>)</font></b></td>
</tr>
</table>
<form name="form1" method="post" action="register.php">
<table width="80%" border="0" height="154">
<tr>
<td width="42%">
<div align="right"><font color="#0000FF">用户名:</font>
</td>
<td width="58%">
<input type="text" name="name" maxlength="20">
</td></div>
</tr>
<tr>
<td colspan="2" height="27">
<div align="left"><font size="2"><font color="#FF0000">注意:</font><font color="#0000FF">用户名只能由英文字母(a-z),数字(0-9)和下划线('_'、'-'、'.'
)构成,不能有空格,且必须以英文字母为开头。 </font></font> </div>
</td>
</tr>
<tr>
<td colspan="2" height="14">
<div align="left"><font size="2"><font color="#FF0000">例如:</font></font></div>
</td>
</tr>
<tr>
<td colspan="2">
<div align="center"><font size="2" color="#FF0000"><b><font color="#0000FF">√</font></b>正确的例子:jocky、lin_xing、nh2001</font></div>
</td>
</tr>
<tr>
<td colspan="2">
<div align="center"><font size="2" color="#FF0000"><b><font color="#0000FF">×</font></b>错误的例子:li
kitty、ming:)、168kk</font></div>
</td>
</tr>
<tr>
<td colspan="2" height="18">
<div align="center"><font size="2" color="#0000FF">如果你已经填写好,请点“</font><font size="2"><font color="#FF0000">下一步</font><font color="#0000FF">”按钮;
点“</font><font color="#FF0000">取消</font><font color="#0000FF">”按钮即取消您刚才的输入,重新开始。</font>
</font></div>
</td>
</tr>
<tr>
<td colspan="2" height="19">
<div align="center">

<input type=image name=name2 src="images/xyb.gif" width="68" height="22" border="0">
<input type=hidden name=name3 value=<?echo$name?>>
 <a href="zcyh.php"><img src="images/cancel.gif" width="68" height="22" border="0"></a></div>
</td>
</tr>
</table>
</form>
<br>

</div>
<br>
<?include("foot.inc.php")?>
</body>
</html>
第二个是:register.php(判断注册用户名是否正确和是否重复,然后输出注册的详细表单)
<?include("header1.inc.php")?>
<div align=center>
<table width="89%" border="0">
<tr>
<td><font color="#ff0000">当前位置:<a href="index.php">主页</a>&gt;&gt;<a href=zcyh.php>注册页面</a>&gt;&gt;详细资料</font></td>
</tr>
</table><br>
<?
if($name==""){
echo"<br><center><font color=blue>用户名不能为空。请</font><a href=zcyh.php>返回</a></center><br>";

文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!