Introduction to...LOGIN

Introduction to PHP Development Student Management System

A simple management system is to add, delete, modify and check data. This tutorial will lead you to build a simple student management system


Tips: This tutorial is just to demonstrate our Processing of data. Therefore, we did not add too many css styles. If you are interested, you can add some css styles yourself if necessary to make the page more beautiful.


First, take a look at the homepage of the learning management system we made in this tutorial. What does the page look like, as shown below

8.jpg

When we click the 'Add Student' link, the page for adding student information will be displayed below

2.jpg


Click 'Browse Student' information, the following page will appear

7.jpg

The above description is our adding information and browsing information. See the picture above, there are links to modify and delete. These functions also need to be completed by us. Let’s take a look at the files we need to create


Create the required files

menu.php: Main page (including index.php and add.php files)

index.php: Browse student information page

add.php: Add student information page

edit.php: Modify the page

action.php: Use switch and case statements to add, Modify, delete, and place the PHP code in the same PHP file


The above are some of the PHP files we need to use. Next, create our database and data table

Next Section
<html lang="en"><head> <meta charset="UTF-8"> <title>学生信息管理</title> <script> function doDel(id) { if(confirm('确认删除?')) { window.location='action.php?action=del&id='+id; } } </script> </head> <body> <meta charset="UTF-8"> <title>登陆界面</title> <h2>学生管理系统</h2> <a href="index.php"> 浏览学生</a> <a href="add.php"> 添加学生</a> <hr> <h3>浏览学生信息</h3> <table cellspacing="0" border="1" width="350"> <tbody><tr> <th>ID</th> <th>姓名</th> <th>性别</th> <th>年龄</th> <th>班级</th> <th>操作</th> </tr> <tr><th>3 </th><th>刘奇</th><th>男 </th><th>12 </th><th>五年级</th><td> <a href="edit.php?id=3">修改</a> <a href="javascript:void(0);" onclick="doDel(3)">删除</a> </td></tr><tr><th>4 </th><th>美女</th><th>女 </th><th>12 </th><th>六年级</th><td> <a href="edit.php?id=4">修改</a> <a href="javascript:void(0);" onclick="doDel(4)">删除</a> </td></tr> </tbody></table> </body></html>
submitReset Code
ChapterCourseware