介绍
小程序开发定制本系统是较为简单的一小程序开发定制个可以完成学生信息、学生成绩小程序开发定制的增删改查,按照小程序开发定制班级学科查询学生成绩,查看所有,小程序开发定制简单的完成小程序开发定制学生选课与删除,查询考课名单等功能。
本系统为本人的期末大作业,所以有很多有待修改的bug以及很多有待优化的功能。
界面与其代码
1.主界面(index.php)
<html> <head> <title>学生信息管理系统</title> </head> <body> <style type="text/css"> body{ background:url("bg.png") no-repeat; background-size: 100%; } div{ font-size: 30px; font-weight: bold; color: #000000; margin-bottom: 15px; } </style> <div style="text-align: center;color: #000000;" >学生信息管理系统</div> <div style="text-align: center;color: #000000;"> <a href="bd.php" target="test">表单</a> <a href="cjcx.php" target="test">学生成绩查询</a> <a href="xsb.php" target="test">学生表管理</a> <a href="kcb.php" target="test">课程表管理</a> <a href="xk.php" target="test">选课系统</a> <a href="bk.php" target="test">补考名单</a> <tr> <td align="center" valign="middle"> <iframe src="" height="800px" width="1200px" name="test" id="test" scrolling="yes" frameborder="0"></iframe> </td> </tr> </div> </body></html>
- 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
- 35
2.表单界面(bd.php)
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>补考</title> <style type="text/css"> table{margin:0 auto;} td{text-align:center;} </style> </head><body><h1 style="text-align: center;color: #000000;">学生表</h1> <table width="100%" border="1" cellpadding="0" cellspacing="0" height="21" bordercolor="#cccccc" style="border-collapse"><tr backgorundcolor="#ffffff"><td width="10%" ><p align="center">学号</td><td width="10%" ><p align="center">姓名</td><td width="10%" ><p align="center">性别</td><td width="10%" ><p align="center">年龄</td><td width="10%" ><p align="center">身份证</td><td width="10%" ><p align="center">专业编号</td><td width="10%" ><p align="center">班级</td><td width="10%" ><p align="center">联系方式</td><td width="10%" ><p align="center">家庭住址</td><td width="10%" ><p align="center">备注</td><tr><?php$conn=mysqli_connect("localhost", "root", "123456", "stumanage");mysqli_set_charset($conn, "set names 'utf8'");$sql ="select * from student";$result= mysqli_query($conn, $sql);while($s=mysqli_fetch_array($result)){ echo "<tr><td height=24>$s[0]</td>"; echo "<td height=24 >$s[1]</td>"; echo "<td height=24 >$s[2]</td>"; echo "<td height=24 >$s[3]</td>"; echo "<td height=24 >$s[4]</td>"; echo "<td height=24 >$s[5]</td>"; echo "<td height=24 >$s[6]</td>"; echo "<td height=24 >$s[7]</td>"; echo "<td height=24 >$s[8]</td>"; echo "<td height=24 >$s[9]</td>";} echo "</tr>";?><table width="100%" border="1" cellpadding="0" cellspacing="0" height="21" bordercolor="#cccccc" style="border-collapse"><h1 style="text-align: center;color: #000000;">课程表</h1> <tr backgorundcolor="#ffffff"><td width="10%" ><p align="center">学号</td><td width="10%" ><p align="center">姓名</td><td width="10%" ><p align="center">课程编号</td><td width="10%" ><p align="center">课程名</td><td width="10%" ><p align="center">分数</td><tr><?php$conn=mysqli_connect("localhost", "root", "123456", "stumanage");mysqli_set_charset($conn, "set names 'utf8'");$sql ="select * from course";$result= mysqli_query($conn, $sql);while($s=mysqli_fetch_array($result)){ echo "<tr><td height=24>$s[0]</td>"; echo "<td height=24 >$s[1]</td>"; echo "<td height=24 >$s[2]</td>"; echo "<td height=24 >$s[3]</td>"; echo "<td height=24 >$s[4]</td>";} echo "</tr>";?><table width="100%" border="1" cellpadding="0" cellspacing="0" height="21" bordercolor="#cccccc" style="border-collapse"><h1 style="text-align: center;color: #000000;">选课表</h1> <tr backgorundcolor="#ffffff"><td width="10%" ><p align="center">课程编号</td><td width="10%" ><p align="center">课程名</td><td width="10%" ><p align="center">主编</td><td width="10%" ><p align="center">出版社</td><td width="10%" ><p align="center">成绩</td><tr><?php$conn=mysqli_connect("localhost", "root", "123456", "stumanage");mysqli_set_charset($conn, "set names 'utf8'");$sql ="select student.sno,sname,course.cno,cname,degree from student,sc,course where student.sno=sc.sno and sc.cno =course.cno order by sno";$result= mysqli_query($conn, $sql);while($s=mysqli_fetch_array($result)){ echo "<tr><td height=24>$s[0]</td>"; echo "<td height=24 >$s[1]</td>"; echo "<td height=24 >$s[2]</td>"; echo "<td height=24 >$s[3]</td>"; echo "<td height=24 >$s[4]</td>";} echo "</tr>";?></body></html>
- 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
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
3.学生成绩查询(cjcx.php)
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>成绩查询</title> <style type="text/css"> table{margin:0 auto;} td{text-align:center;} </style> </head><body><h1 style="text-align: center;color: #000000;">成绩查询</h1> <form name="frm1" method="post" > <table align="center" > <tr> <td width="100"><span>学生班级:</span></td> <td> <input name="sclass" id="sclass" type="text"> </td> <td width="100"><span>课程编号:</span></td> <td> <input name="cno" id="cno" type="text"> <input type="submit" name="test" value="查找"> </td> </tr> </table></form><br> <table width="100%" border="1" cellpadding="0" cellspacing="0" height="21" bordercolor="#cccccc" style="border-collapse"><tr backgorundcolor="#ffffff"><td width="15%" ><p align="center">班级</td><td width="15%" ><p align="center">学号</td><td width="20%" ><p align="center">姓名</td><td width="15%" ><p align="center">课程号</td><td width="20%" ><p align="center">课程名</td><td width="15%" ><p align="center">分数</td><tr><?php$sno = @$_POST['sno'];$sclass = @$_POST['sclass'];$cno = @$_POST['cno'];$conn=mysqli_connect("localhost", "root", "123456", "stumanage");mysqli_set_charset($conn, "set names 'utf8'");$sql ="select sclass,student.sno,sname,course.cno,cname,degree from student,sc,course where student.sclass='$sclass' and student.sno=sc.sno and sc.cno='$cno'and sc.cno =course.cno";$result= mysqli_query($conn, $sql);while($s=mysqli_fetch_array($result)){ echo "<tr><td height=24>$s[0]</td>"; echo "<td height=24 >$s[1]</td>"; echo "<td height=24 >$s[2]</td>"; echo "<td height=24 >$s[3]</td>"; echo "<td height=24 >$s[4]</td>"; echo "<td height=24 >$s[5]</td>";} echo "</tr>";?></body></html>
- 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
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
4.学生表管理(xsb.php)
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>学生信息更新</title> <style type="text/css"> table{margin:0 auto;} td{text-align:center;} </style> </head><body><h1 style="text-align: center;color: #000000;">学生表管理</h1> <form name="frm1" method="post" > <table align="center" > <tr> <td width="100"><span>根据学号查询:</span></td> <td> <input name="sno" id="sno" type="text"> <input type="submit" name="test" value="查找"> </td> </tr> </table></form><br><?php$conn = mysqli_connect("localhost", "root", "123456", "stumanage");mysqli_set_charset($conn, "set names 'utf8'");session_start();$number = @$_POST['sno'];$_SESSION['number']=$number;$sql = "select * from student where sno='$number'";$result = mysqli_query($conn, $sql);$row = @mysqli_fetch_array($result);?><form name="frm2" method="post" enctype="multipart/form-data"> <table border="1" align="center"> <tr> <td><span>学号:</span></td> <td> <input name="sno" type="text" value="<?php echo $row['sno']; ?>"> <input name="h_sno" type="hidden" value="<?php echo $row['sno']; ?>"> </td> </tr> <tr> <td><span>姓名:</span></td> <td><input name="sname" type="text" value="<?php echo $row['sname']; ?>"></td> </tr> <tr> <td><span>性别:</span></td> <td><input name="ssex" type="text" value="<?php echo $row['ssex']; ?>"></td> </tr> <tr> <td><span>年龄:</span></td> <td><input name="sage" type="text" value="<?php echo $row['sage']; ?>"></td> </tr> <tr> <td><span>身份证号:</span></td> <td><input name="sid" type="text" value="<?php echo $row['sid']; ?>"></td> </tr> <tr> <td><span>专业编号:</span></td> <td><input name="sspeciality" type="text" value="<?php echo $row['sspeciality']; ?>"></td> </tr> <tr> <td><span>班级编号:</span></td> <td><input name="sclass" type="text" value="<?php echo $row['sclass']; ?>"></td> </tr> <tr> <td><span>联系方式:</span></td> <td><input name="sphone" type="text" value="<?php echo $row['sphone']; ?>"></td> </tr> <tr> <td><span>家庭住址:</span></td> <td><input name="saddress" type="text" value="<?php echo $row['saddress']; ?>"></td> </tr> <tr> <td><span>备注:</span></td> <td><input name="sremarks" type="text" value="<?php echo $row['sremarks']; ?>"></td> </tr> <td align="center" colspan="2"> <input name="b" type="submit" value="修改"> <input name="b" type="submit" value="添加"> <input name="b" type="submit" value="删除"> </td> </tr> </table></form></body></html><?php$num = @$_POST['sno'];$XH=@$_POST['sno'];$name = @$_POST['sname'];$XB = @$_POST['ssex'];$NL = @$_POST['sage'];$SFZH = @$_POST['sid'];$ZYBH = @$_POST['sspeciality'];$BJBH = @$_POST['sclass'];$LXFS = @$_POST['sphone'];$JTZZ = @$_POST['saddress'];$BZ = @$_POST['sremarks'];if (@$_POST["b"] == '修改') { if ($num!=$XH){ echo "<script>alert('学号与原数据有异,无法修改!');location.href='xsb.php'</script>"; } else { $update_sql="update student set sname='$name',ssex='$XB',sage='$NL',sid='$SFZH',sspeciality='$ZYBH',sclass='$BJBH',sphone='$LXFS',saddress='$JTZZ',sremarks='$BZ' where sno='$XH'"; $update_result= mysqli_query($conn,$update_sql); if (mysqli_affected_rows($conn) != 0){ echo "<script>alert('修改成功!');location.href='xsb.php'</script>"; } else { echo "<script>alert('修改失败!');location.href='xsb.php'</script>"; } }}if (@$_POST["b"] == '添加') { $insert_sql = "insert into student(sno,sname,ssex,sage,sid,sspeciality,sclass,sphone,saddress,sremarks) values('$XH','$name','$XB','$NL','$SFZH','$ZYBH','$BJBH','$LXFS','$JTZZ','$BZ')"; $insert_result = mysqli_query($conn, $insert_sql); if (mysqli_affected_rows($conn) != 0){ echo "<script>alert('添加成功!');location.href='xsb.php'</script>"; } else { echo "<script>alert('添加失败!');location.href='xsb.php'</script>"; } }if (@$_POST["b"] == '删除') { if ($num==null) { echo "<script>alert('请输入要删除的学号!')</script>"; } else { $de_sql = "select sno from student where sno='$num'"; $de_result = mysqli_query($conn, $de_sql); $de_row = mysqli_fetch_array($de_result); if (!$de_row) echo "<script>alert('学号不存在,无法删除!')</script>"; else { $del_sql = "delete from student where sno='$num'"; $del_result = mysqli_query($conn, $del_sql); if (mysqli_affected_rows($conn) != 0) echo "<script>alert('删除学号为" . $num . "的学生成功!')</script>"; } }}?>
- 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
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
5.课程表管理(kcb.php)
<html> <head> <meta charset="UTF-8"> <title>课程信息更新</title> <style type="text/css"> table{margin:0 auto;} td{text-align:center;} </style> </head><body> <h1 style="text-align: center;color: #000000;">课程表管理</h1> <form name="frm1" method="post"> <table align="center"> <tr> <td width="120"><span>根据课程号查询:</span></td> <td> <input name="cno" id="cno" type="text"> <input type="submit" name="test" value="查找"> </td> </tr> </table> </form> <?php$conn= mysqli_connect("localhost","root","123456","stumanage");mysqli_set_charset($conn,"utf8");$KCH=@$_POST['cno'];$sql="select * from course where cno='$KCH'";$result= mysqli_query($conn,$sql);$row=@mysqli_fetch_array($result);if (($cno!=NULL)&&(!$row)) echo "<script>alert('没有该课程信息!')</script>";?><form name="frm2" method="post"> <table border="1" align="center"> <tr> <td><span>课程编号:</span></td> <td> <input name="cno" type="text" value="<?php echo $row['cno'];?>"> <input name="h_cno" type="hidden" value="<?php echo $row['h_cno'];?>"> </td> </tr> <tr> <td><span>课程名:</span></td> <td><input name="cname" type="text" value="<?php echo $row['cname'];?>"></td> </tr> <tr> <td><span>主编:</span></td> <td><input name="ceditor" type="text" value="<?php echo $row['ceditor'];?>"></td> </tr> <tr> <td><span>出版社:</span></td> <td><input name="cpublish" type="text" value="<?php echo $row['cpublish'];?>"></td> </tr> <tr> <td><span>学分:</span></td> <td><input name="ccredit" type="text" value="<?php echo $row['ccredit'];?>"></td> </tr> <tr> <td align="center" colspan="2"> <input name="b" type="submit" value="修改"> <input name="b" type="submit" value="添加"> <input name="b" type="submit" value="删除"> </td> </tr> </table></form></body></html><?php$KCH=@$_POST['cno'];$h_KCH=@$_POST['cno'];$KCM=@$_POST['cname'];$ZB=@$_POST['ceditor'];$CBS=@$_POST['cpublish'];$XF=@$_POST['ccredit'];if (@$_POST["b"]=='修改'){ if($KCH!=$h_KCH) echo "<script>alert('课程编号与原数据有异,无法修改!');</script>"; else { $update_sql="update course set cname='$KCM',ceditor='$ZB',cpublish='$CBS',ccredit='$XF' where cno='$KCH'"; $update_result= mysqli_query($conn,$update_sql); if (mysqli_affected_rows($conn)!=0) echo "<script>alert('修改成功!');</script>"; else echo "<script>alert('信息未修改!');</script>"; }}//单击【添加】按钮if (@$_POST["b"]=='添加'){ $insert_sql="insert into course(cno,cname,ceditor,cpublish,ccredit) values('$KCH','$KCM','$ZB','$CBS','$XF')"; $insert_result= mysqli_query($conn,$insert_sql)or die('添加失败!'); if(mysqli_affected_rows($conn)!=0) echo "<script>alert('添加成功!');</script>"; }//单击【删除】按钮if (@$_POST["b"]=='删除'){ if(!$KCH) { echo "<script>alert('请输入要删除的课程号!');</script>";} else { $d_sql="select cno from course where cno='$KCH'"; $d_result= mysqli_query($conn,$d_sql); $d_row= mysqli_fetch_array($d_result); if (!$d_row) echo "<script>alert('课程编号不存在,无法删除!');</script>"; else { $del_sql="delete from course where cno='$KCH'"; $del_result= mysqli_query($conn,$del_sql)or die('删除失败!'); if (mysqli_affected_rows($conn)!=0) echo "<script>alert('删除课程".$KCH."成功!');</script>"; }}}?>
- 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
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
6.选课系统(xk.php)
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>补考</title> <style type="text/css"> table{margin:0 auto;} td{text-align:center;} </style> </head><body><h1 style="text-align: center;color: #000000;">选课表</h1> <table width="100%" border="1" cellpadding="0" cellspacing="0" height="21" bordercolor="#cccccc" style="border-collapse"><tr backgorundcolor="#ffffff"><td width="20%" ><p align="center">课程编号</td><td width="20%" ><p align="center">课程名</td><td width="20%" ><p align="center">老师</td><td width="20%" ><p align="center">教学用书出版社</td><td width="20%" ><p align="center">学分</td></tr><?php$conn=mysqli_connect("localhost", "root", "123456", "stumanage");mysqli_set_charset($conn, "set names 'utf8'");$sql ="select * from course";$result= mysqli_query($conn, $sql);while($s=mysqli_fetch_array($result)){ echo "<tr><td height=24>$s[0]</td>"; echo "<td height=24 >$s[1]</td>"; echo "<td height=24 >$s[2]</td>"; echo "<td height=24 >$s[3]</td>"; echo "<td height=24 >$s[4]</td>";} echo "</tr>";?><form name="frm1" method="post" > <table align="center" > <h2><p style="text-align: center;color: #000000;">选课</h2></p> <tr> <td width="100"><span>选课学生学号:</span></td> <td> <input name="sno" id="sno" type="text"> </td> <td width="100"><span>所选课编号:</span></td> <td> <input name="cno" id="cno" type="text"> <input type="submit" name="test" value="选课"> </td> </tr> </table><?php$sno = @$_POST['sno'];$cno = @$_POST['cno'];if (@$_POST["test"]=='选课'){ $insert_sql="insert into sc(sno,cno) values('$sno','$cno')"; $insert_result= mysqli_query($conn,$insert_sql)or die('添加失败!'); if(mysqli_affected_rows($conn)!=0) echo "<script>alert('选课成功!');</script>"; }?></form><h3 style="text-align: center;color: #000000;">修改选课</h3> <form name="frm1" method="post"> <table align="center"> <tr> <td width="100"><span>学号:</span></td> <td> <input name="sno" id="sno" type="text"> </td> <td width="100"><span>选错课程号:</span></td> <td> <input name="cno" id="cno" type="text"> <input type="submit" name="test" value="查找"> </td> </tr> </table> </form> <?php$conn= mysqli_connect("localhost","root","123456","stumanage");mysqli_set_charset($conn,"utf8");$cno=@$_POST['cno'];$sno=@$_POST['sno'];$sql="select * from sc where cno='$cno'AND sno='$sno'";$result= mysqli_query($conn,$sql);$row=@mysqli_fetch_array($result);?><form name="frm2" method="post"> <table border="1" align="center"> <tr> <td><span>学号:</span></td> <td> <input name="sno" type="text" value="<?php echo $row[0];?>"> </td> </tr> <tr> <td><span>课程号:</span></td> <td><input name="cno" type="text" value="<?php echo $row[1];?>"></td> </tr> <tr> <td align="center" colspan="2"> <input name="b" type="submit" value="删除"> </td> </tr> </table></form></body></html><?php$sno=@$_POST['sno'];$cno=@$_POST['cno'];if (@$_POST["b"]=='删除'){ if(!$cno) { echo "<script>alert('请输入要删除的课程号!');</script>";} $del_sql="delete from sc where cno='$cno' and sno='$sno'"; $del_result= mysqli_query($conn,$del_sql)or die('删除失败!'); if (mysqli_affected_rows($conn)!=0) echo "<script>alert('删除成功!');</script>"; }?></body></html>
- 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
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
7.补考名单(bk.php)
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>补考</title> <style type="text/css"> table{margin:0 auto;} td{text-align:center;} </style> </head><body><h1 style="text-align: center;color: #000000;">以下学生需要补考</h1> <table width="100%" border="1" cellpadding="0" cellspacing="0" height="21" bordercolor="#cccccc" style="border-collapse"><tr backgorundcolor="#ffffff"><td width="20%" ><p align="center">学号</td><td width="20%" ><p align="center">姓名</td><td width="20%" ><p align="center">课程号</td><td width="20%" ><p align="center">课程名</td><td width="20%" ><p align="center">分数</td><tr><?php$conn=mysqli_connect("localhost", "root", "123456", "stumanage");mysqli_set_charset($conn, "set names 'utf8'");$sql ="select sc.sno,sname,sc.cno,cname,degree from student,sc,course where sc.degree<60 and student.sno=sc.sno and sc.cno =course.cno order by sno";$result= mysqli_query($conn, $sql);while($s=mysqli_fetch_array($result)){ echo "<tr><td height=24>$s[0]</td>"; echo "<td height=24 >$s[1]</td>"; echo "<td height=24 >$s[2]</td>"; echo "<td height=24 >$s[3]</td>"; echo "<td height=24 >$s[4]</td>";} echo "</tr>";?></body></html>
- 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
- 35
- 36
- 37
- 38
- 39
数据库部分
学生表(student)
字段名称 数据类型 长度 是否为空
学号 (sno) char 10 N
姓名( sname) varchar 8 N
性别(ssex) varchar 8 N
年龄(sage) varchar 8 N
身份证号(sid) varchar 8 N
专业编号(sspeciality) varchar 60 N
课程编号(sclass) varchar 8 N
联系方式(sphone) varchar 12 N
家庭住址(saddress) varchar 60 N
备注(sremarks) Varchar 60 N
课程表(course)
字段名称 数据类型 长度 是否为空
课程编号(cno) varchar 8 N
课程名称(cname) varchar 60 N
主编(ceditor) varchar 20 N
出版社(cpublish) varchar 20 N
学分(ccredut) decimal (4,1) N
选课表(sc)
字段名称 数据类型 长度 是否为空
学号(sno) char 10 N
课程编号(cno) varchar 8 N
分数(degree) decimal (4,1) N