每日总结4.26

<?php 
include_once 'conn.php';
session_start();

$ndate =date("Y-m-d");
$addnew=$_POST["addnew"];
if ($addnew=="1" )
{

$zhanghao=$_POST["zhanghao"];$mima=$_POST["mima"];$xingming=$_POST["xingming"];$xingbie=$_POST["xingbie"];$diqu=$_POST["diqu"];$Email=$_POST["Email"];$zhaopian=$_POST["zhaopian"];
$sql="select id from yonghuzhuce where zhanghao='".$zhanghao."'";
$query=mysql_query($sql);
$rowscount=mysql_num_rows($query);
if($rowscount>0)
{
echo "<script>javascript:alert('对不起,该账号已经存在,请换其他账号再试!!');history.back();</script>";
}
else
{
$sql="insert into yonghuzhuce(zhanghao,mima,xingming,xingbie,diqu,Email,zhaopian) values('$zhanghao','$mima','$xingming','$xingbie','$diqu','$Email','$zhaopian') ";
mysql_query($sql);

echo "<script>javascript:alert('注册成功!请待管理员审核后方可正常登陆!');location.href='index.php';</script>";
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">

<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD>
<TITLE>化妆品销售网站</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="qtimages/style.css" type=text/css rel=stylesheet>

<script language="javascript">
function check()
{
if(document.form1.zhanghao.value==""){alert("请输入账号");document.form1.zhanghao.focus();return false;}
if(document.form1.mima.value==""){alert("请输入密码");document.form1.mima.focus();return false;}
if(document.form1.mima.value!=document.form1.mima2.value){alert("对不起,两次密码不一致,请重试");document.form1.mima.focus();return false;}
if(document.form1.xingming.value==""){alert("请输入姓名");document.form1.xingming.focus();return false;}
if(document.form1.Email.value==""){alert("请输入Email");document.form1.Email.focus();return false;}
if(document.form1.zhaopian.value==""){alert("请输入照片");document.form1.zhaopian.focus();return false;}
var strEmail = document.getElementById("Email").value;
var reg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
var email_Flag = reg.test(strEmail);
if(email_Flag){

}
else{
alert("对不起,您输入的邮箱地址格式错误。");
return false;
}

}

</script>
<script language="javascript">


function OpenScript(url,width,height)
{
var win = window.open(url,"SelectToSort",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
}
function OpenDialog(sURL, iWidth, iHeight)
{
var oDialog = window.open(sURL, "_EditorDialog", "width=" + iWidth.toString() + ",height=" + iHeight.toString() + ",resizable=no,left=0,top=0,scrollbars=no,status=no,titlebar=no,toolbar=no,menubar=no,location=no");
oDialog.focus();
}
</script>

<META content="MSHTML 6.00.2900.6058" name=GENERATOR></HEAD>
<BODY>
<?php include_once 'qttop.php';?>

<TABLE cellSpacing=0 cellPadding=0 width=1120 align=center bgColor=#ffffff
border=0>
<TBODY>
<TR>
<TD width=5>&nbsp;</TD>
<TD vAlign=top width=230>
<?php include_once 'qtleft.php';?>
</TD>
<TD vAlign=top width=10>&nbsp;</TD>
<TD vAlign=top>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=bottom height=40>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width=44 height=40><IMG height=35
src="qtimages/B0039.gif"
width=30></TD>
<TD width=11>&nbsp;</TD>
<TD width=209><span class="red"><strong>用户注册</strong></span></TD>
<TD vAlign=bottom align=right width=50></TD>
<TD vAlign=bottom align=right width=45>&nbsp;</TD>
<TD align=left width=291>&nbsp;&nbsp;</TD>
</TR></TBODY></TABLE></TD></TR>
<TR>
<TD bgColor=#dadada height=1></TD></TR>
<TR>
<TD bgColor=#f6f6f6 height=4></TD></TR>
<TR>
<TD bgColor=#ffffff height=6><table width="100%" border="1" align="center" cellpadding="3" cellspacing="1" bordercolor="#ADCEEF" style="border-collapse:collapse">
<form name="form1" method="post" action="">
<tr>
<td>账号:</td>
<td><input name='zhanghao' type='text' id='zhanghao' value='' />
&nbsp;*</td>
</tr>
<tr>
<td>密码:</td>
<td><input name='mima' type='password' id='mima' value='' />
&nbsp;* 确认密码:
<input name='mima2' type='password' id='mima2' value='' /></td>
</tr>
<tr>
<td>姓名:</td>
<td><input name='xingming' type='text' id='xingming' value='' />
&nbsp;*</td>
</tr>
<tr>
<td>性别:</td>
<td><select name='xingbie' id='xingbie'>
<option value="男">男</option>
<option value="女">女</option>
</select></td>
</tr>
<tr>
<td>地区:</td>
<td><select name='diqu' id='diqu'>
<option value="浙江">浙江</option>
<option value="湖北">湖北</option>
<option value="河南">河南</option>
<option value="北京">北京</option>
</select></td>
</tr>
<tr>
<td>Email:</td>
<td><input name='Email' type='text' id='Email' value='' />
&nbsp;*</td>
</tr>
<tr>
<td>照片:</td>
<td><input name='zhaopian' type='text' id='zhaopian' value='' size='50' />
&nbsp;* <a href="javaScript:OpenScript('upfile.php?Result=zhaopian',460,180)"><img src="Images/Upload.gif" width="30" height="16" border="0" align="absmiddle" /></a></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="hidden" name="addnew" value="1" />
<input name="Submit" type="submit" class="hsgbutton" onClick="return check();" value="注册" />
<input name="Submit2" type="reset" class="hsgbutton" value="重置" /></td>
</tr>
</form>
</table></TD>
</TR></TBODY></TABLE>
</TD>
<TD width=5>&nbsp;</TD></TR></TBODY></TABLE>
<?php include_once 'qtdown.php';?></BODY></HTML>
posted @ 2021-04-26 20:13  王昊宁  阅读(42)  评论(0编辑  收藏  举报