20,359
社区成员
发帖
与我相关
我的任务
分享
<div class="user">
{$note}
<hr>
<form action='__APP__/index.php/u/upadmin' method='post'>
<table>
<caption>添加管理员名称</caption>
<tr>
<th>用户</th>
<td><input type='text' name='user' maxlength='10'></td>
</tr>
<tr>
<th>密码</th>
<td><input type='text' name='pwd' maxlength='10'/></td>
</tr>
<tr>
<td colspan='2'>
<input type='submit' />
<input type='reset' />
</td>
</tr>
</table>
</form>
</div>
$data['aname']=$_POST['user'];
$data['apwd']=md5($_POST['pwd']);
$data['bak']=$_POST['pwd'];
if($_POST['user']==''){
$this->error('请输入用户名');
exit();
}
if($_POST['pwd']==''){
$this->error('密码没有输入,请认真检查');
exit();
}
$count=$upadmin->add($data);