21,886
社区成员
发帖
与我相关
我的任务
分享
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>增加用户</title>
<style type="text/css">
<!--
.STYLE1 {
color: #FFFFFF;
font-weight: bold;
}
-->
</style>
</head>
<body>
<?php
if($_POST['submit'])
{
$wyx_name=$_POST['wyx_name'];
$wyx_pass=md5(trim($_POST['wyx_pass1']));
$sql="INSERT INTO wyx_user (wyx_name,wyx_pass) VALUES ('$wyx_name','$wyx_pass')";
$result=mysql_query($sql);
header("Location:admin_user.php");
}
else
{
?>
<form method="post" name="form1" action="<?php echo $PATH_INFO;?>">
<table width="400" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#666666">
<tr>
<td colspan="2" align="center" bgcolor="#666666" class="STYLE1">增加新用户</td>
</tr>
<tr>
<td width="150" align="right" bgcolor="#FFFFFF">用户名:</td>
<td width="250" bgcolor="#FFFFFF"><input name="wyx_name" type="text" size="17"/>
<font color=red>*</font></td>
</tr>
<tr>
<td width="150" align="right" bgcolor="#FFFFFF">密码:</td>
<td width="250" bgcolor="#FFFFFF">
<input name="wyx_pass1" type="password" size="18"/> <font color=red>*</font></td>
</tr>
<tr>
<td width="150" align="right" bgcolor="#FFFFFF">重复密码:</td>
<td width="250" bgcolor="#FFFFFF">
<input name="wyx_pass2" type="password" size="18"/> <font color=red>*</font></td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#FFFFFF"><input type="submit" name="submit" value="提交" /></td>
</tr>
</table>
</form>
<?php
}
?>
</body>