|
如何实现输入用户名密码后可查询信息并修改
这是我的代码,运行结果如图。如何显示出数据库信息并可以修改某一项。
请把信息填写完整
";
echo "";
exit;
}
else
{
$query="select * from $student_table where xuehao='$xuehao'";
mysql_query("set names 'GB2312'");
$result=mysql_query($query);
$row=mysql_fetch_array($result);
if($row==0)
{
echo"你还没有注册,请先注册。
";
echo "";
exit;
}
$query="select password as sm from $student_table where xuehao='$xuehao'";
mysql_query("set names 'GB2312'");
$result=mysql_query($query);
$row=mysql_fetch_array($result);
$num=strlen($row['xuehao']);
$xh=$row['xuehao'];
$n=0;
if($row[sm]!=$password)
{
echo"你输入的学号和密码不匹配,请重新输入。
";
echo "";
exit;
}
}
?>
[table]
[tr]
[td]>>>学生信息[/td]
[/tr]
[tr]
[td]
学号: |
|