请教,多类别登录问题怎样实现? <input name="student" type = submit> <input name="admin" type = submit>if($_POST['student']){ connection student;}else{ connection admin;} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 多谢楼上指点.对于大致步骤我了解,但对php编码连接部分却有点儿犯晕.<li><label>用户名:</label><input name="TextBox1" type="text" id="TextBox1" tabindex="1" class="text_nor" /></li><li><label>密 码:</label><input name="TextBox2" type="password" id="TextBox2" tabindex="2" class="text_nor" /></li><li><table id="RadioButtonList1" border="0" width="100%"><tr><td><input id="RadioButtonList1_1" type="radio" name="RadioButtonList1" value="教师" tabindex="3" /><label for="RadioButtonList1_1">教师</label></td><td><input id="RadioButtonList1_2" type="radio" name="RadioButtonList1" value="学生" checked="checked" tabindex="3" /><label for="RadioButtonList1_2">学生</label></td></tr></table></li><li><input type="submit" name="Button1" value="" id="Button1" class="btn_dl" /><input type="submit" name="Button2" value="" id="Button2" class="btn_cz" onclick="window.close();" /></li> if($_POST['Button1']&&$_POST['RadioButtonList1'] == "学生") //最好value设置为数字{ connection student; }else { connection admin; } 楼上的这个问题用搞两个提交按钮吗??<form action="handle.php" method="post"><input type="radio" value="1" name="person"/>学生<input type="radio" value="2" name="person"/>管理员<input type="submit" value="提交" /></form>handle.php程序这样判断if($_POST[submit]){switch($_POST[person]){case '1':include("student_login.php");break;case '2':include("admin_login.php");break;default:break;}} zendstudio 打开时报错 $_FILES如何获取文件路径 windows下安装mediawiki的问题 JS代码转成PHP代码 文件名后缀是html格式的文件,如果有php代码,php代码会被忽略? 问了三遍没人回答,再问....看这个代码.... php 4.x中有没有忽略大小写的strpos及str_replace函数? 重定向问题? Flex与PHP交互:用的是amfphp,报错,求解 php连接数据库成功,但是无法查询到表,为什么?急!!!!!! 这样的错误。。你们见过几次。。 如何改变数组当中一个元素的值
<label>用户名:</label><input name="TextBox1" type="text" id="TextBox1" tabindex="1" class="text_nor" />
</li><li>
<label>密 码:</label><input name="TextBox2" type="password" id="TextBox2" tabindex="2" class="text_nor" />
</li><li>
<table id="RadioButtonList1" border="0" width="100%">
<tr>
<td>
<input id="RadioButtonList1_1" type="radio" name="RadioButtonList1" value="教师" tabindex="3" /><label for="RadioButtonList1_1">教师</label>
</td>
<td>
<input id="RadioButtonList1_2" type="radio" name="RadioButtonList1" value="学生" checked="checked" tabindex="3" /><label for="RadioButtonList1_2">学生</label>
</td>
</tr>
</table>
</li><li>
<input type="submit" name="Button1" value="" id="Button1" class="btn_dl" /><input type="submit" name="Button2" value="" id="Button2" class="btn_cz" onclick="window.close();" />
</li>
{
connection student;
}else
{
connection admin;
}
<form action="handle.php" method="post">
<input type="radio" value="1" name="person"/>学生
<input type="radio" value="2" name="person"/>管理员
<input type="submit" value="提交" />
</form>
handle.php程序这样判断
if($_POST[submit]){
switch($_POST[person]){
case '1':
include("student_login.php");
break;
case '2':
include("admin_login.php");
break;
default:
break;
}
}