function checkAdmin($sql) { return fetOne($sql); }
<?php require_once '../include.php'; $id = $_REQUEST['id']; $sql = "select id,username,password,email from imooc_admin where id='{$id}'"; $row = fetOne($sql); ?> <!DOCTYPE html> <html> <head> <title>Insert title here</title> </head> <body> <h3>编辑管理员</h3> <form action="doAdminAction.php?act=editAdmin&id=<?php echo $id; ?> " method="post"> <table width="70%" border="1" cellpadding="5" cellspacing="0" bgcolor="#cccccc"> <tr> <td>管理员名称</td> <td><input type="text" name="username" placeholder="<?php echo $row['username']; ?> " /></td> </tr> <tr> <td>管理员密码</td> <td><input type="password" name="password" placeholder="<?php echo $row['password']; ?>