日期:2014-05-16 浏览次数:20386 次
<form method="post" action="lib\ChkLogin.php">
..............................
<select name="role">
<option value="student">student</option>
<option value="teacher">teacher</option>
</select>
</td>
</tr>
<tr>
<td><input type="submit" value="ok" /></td>
<td><input type="reset" value="no" /></td>
</tr>
</table>
</form>
<?php
$username = $_POST['username'];
$passwd = $_POST['passwd'];
$role = $_POST['role'];
if($username==""||$passwd==""){
echo "<script>";
echo "alert(\"用户名或密码不能为空!\");";
echo "location.href=\"../index.php\";";
echo "</script>";
}
......................