前言
一个简单的phpmysql项目学生信息管理系统,用于广大学子完成期末作业的参考,该系统实现增、删、改、查等基本功能。
1、登录界面
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <title>无标题文档</title><div class = "login" > <h2 class = "BT" >Login</h2> <div class = "zm" > 账号: 密码:<p>没有账号?点击<a href= "newuser.php" rel= "external nofollow" >注册</a></p> <div> </div> </div> </div> |
当输入密码点击登录后会弹出“登录成功”或者“账号或密码有错误提示”
2、注册界面
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | <title>无标题文档</title><div class = "l" > <img decoding= "async" src= "%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20220530195333333png.png" width= "100px" height= "100px" ><h3>学生成绩管理系统</h3> </div> <div style= "height: 130px" > <a href= "login.php" rel= "external nofollow" class = "ll" ></a> </div> <div class = "zc" style= "padding-left: 30px" > <h2 align= "center" style= "color:#D6CFCF" >DeleteStudent</h2> 账 号: 密 码: 确认密码: </div> <?php include ( "connection.php" ); if (isset( $_POST [ "tj" ])){ $id = $_POST [ "id" ]; $password = $_POST [ "password" ]; $repassword = $_POST [ "repassword" ]; if ( $password == $repassword ){ connection(); $sql = "insert into user(userid,password)values('" . $id . "','" . $password . "')" ; $result =mysql_query( $sql ); echo "alert('注册成功!');location='login.php'" ; } else { echo "alert('密码不一致');location='newuser.php'" ; } } ?> |
当输入密码点击注册后会弹出“注册成功”或者“密码不一致”或者账号密码不为空提示·
点击图上的小房子可以返回登录界面
3、主界面
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <title>无标题文档</title><div class = "l" > <img decoding= "async" src= "%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20220530195333333png.png" width= "100px" height= "100px" ><h3>学生信息管理系统</h3> </div> <div style= "height: 130px" > <a href= "login.php" class = "ll" ></a> </div> <h3 style= "padding-left: 48%;padding-top: 0px;color: aquamarine;height: 30px;line-height: 29px" ><a href= "table.php" style= "text-decoration: none;color: aqua" class = "a3" >学生表</a></h3> <div class = "nav" > <a href= "select.php" class = "bg1" >查询学生信息</a> <a href= "update.php" class = "bg2" >修改学生信息</a> <a href= "delete.php" class = "bg3" >删除学生信息</a> <a href= "adding.php" class = "bg4" >添加学生信息</a> </div> |
4、学生表界面
点击主界面上的“学生表”可以进入学生表界面
1 2 3 4 5 6 7 | <title>无标题文档</title><div class = "l" > <img decoding= "async" src= "%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20220530195333333png.png" width= "100px" height= "100px" ><h3>学生信息管理系统</h3> </div> <div style= "height: 130px" > <a href= "main.php" class = "ll" ></a> </div> <h2 align= "center" >学生表</h2><br> |
<?PHP include("connection.php");
connection();
$sql="select * from studenttable ";
mysql_query("SET CHARACTER SET utf-8");
$result=mysql_query($sql);
while($row=mysql_fetch_assoc($result)){
echo("
echo(“
“);
echo(“
“);
echo(“
“);
echo(“
“);
echo(“
“);
echo(“”);
}
?>
姓名 | 性别 | 年龄 | 学号 | 联系方式 |
“.$row[‘Name’].” | “.$row[‘Sex’].” | {$row[‘Age’]} | {$row[‘Sno’]} | {$row[‘TelphoneNumber’]} |
点击图上的小房子可以返回主界面
5 、查询学生界面
1 2 3 4 5 6 7 8 9 10 11 12 13 | <title>无标题文档</title><div class = "l" > <img decoding= "async" src= "%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20220530195333333png.png" width= "100px" height= "100px" ><h3>学生成绩管理系统</h3> </div> <div style= "height: 130px" > <a href= "main.php" class = "ll" ></a> </div> <div class = "zc" style= "padding-left: 30px" > <h2 align= "center" style= "color:#D6CFCF" >SelectStudent</h2> <br> 学 号:<br><br> </div> |
0)
{
echo “alert(‘查询成功!’);”;
}else{
echo “alert(‘学号不存在!’);”;
}
while($row=mysql_fetch_assoc($result)){
echo(“
echo(“
“);
echo(“
“);
echo(“
“);
echo(“
“);
echo(“
“);
echo(“
“);}
}
?>
姓名 | 性别 | 年龄 | 学号 | 联系方式 |
“.$row[‘Name’].” | “.$row[‘Sex’].” | {$row[‘Age’]} | {$row[‘Sno’]} | {$row[‘TelphoneNumber’]} |
点击图上的小房子可以返回主界面
6、修改学生信息界面
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | <title>无标题文档</title><div class = "l" > <img decoding= "async" src= "%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20220530195333333png.png" width= "100px" height= "100px" ><h3>学生成绩管理系统</h3> </div> <div style= "height: 130px" > <a href= "main.php" class = "ll" ></a> </div> <div class = "zc" style= "padding-left: 30px" > <h2 align= "center" style= "color:#D6CFCF" >UpdateStudent</h2> <br> 姓 名:<br><br>学 号:<br><br> 性 别:男女 <br><br> 年 龄:<br><br> 联系方式: <br> </div> 0){ $Name = $_POST [ "name" ]; $Sno = $_POST [ "sno" ]; $Sex = $_POST [ "sex" ]; $Age = $_POST [ "age" ]; $tel = $_POST [ "telphone" ]; $sql = "update studenttable set Sex='" . $Sex . "',Age='" . $Age . "',TelphoneNumber='" . $tel . "'where Sno='" . $Sno . "' and Name='" . $Name . "'" ; mysql_query( $sql ) or die (mysql_error()); echo ( "alert('修改成功');window.location.href='table.php';" ); } else { echo ( "alert('学号或姓名不存在');" ); } } ?> |
点击图上的小房子可以返回主界面
7、删除学生信息界面
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | <title>无标题文档</title><div class = "l" > <img decoding= "async" src= "%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20220530195333333png.png" width= "100px" height= "100px" ><h3>学生成绩管理系统</h3> </div> <div style= "height: 130px" > <a href= "main.php" class = "ll" ></a> </div> <div class = "zc" style= "padding-left: 30px" > <h2 align= "center" style= "color:#D6CFCF" >DeleteStudent</h2> <br> 姓 名:<br><br>学 号:<br><br> </div> 0){ $Name = $_POST [ "name" ]; $Sno = $_POST [ "sno" ]; $sql = "delete from studenttable where Sno='" . $Sno . "' and Name='" . $Name . "'" ; mysql_query( $sql ) or die (mysql_error()); echo ( "alert('删除成功');window.location.href='table.php';" ); } else { echo ( "alert('学号或姓名不存在');" ); } } ?> |
点击图上的小房子可以返回主界面
8、添加学生信息界面
点击图上的小房子可以返回主界面
9、后台数据库
总结
到此这篇关于基于php+mysql的期末作业小项目的文章就介绍到这了,更多相关php mysql学生信息管理系统内容请搜索IT俱乐部以前的文章或继续浏览下面的相关文章希望大家以后多多支持IT俱乐部!