PHP development student management system add information page

Create add.php file

Create add.php file Make a page like the one below

1.jpg

Using a table layout, the code is as follows

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学生管理系统</title>
</head>
<body>
    <?php include ('menu.php'); ?>
 <h3>增加学生信息</h3>
    <form action="action.php?action=add" method="post">
        <table>
            <tr>
                <td>姓名</td>
                <td><input type="text" name="name"></td>
            </tr>
            <tr>
                <td>年龄</td>
                <td><input type="text" name="age"></td>
            </tr>
            <tr>
                <td>性别</td>
                <td><input type="radio" name="sex" value="男">男</td>
                <td><input type="radio" name="sex" value="女">女</td>
            </tr>
            <tr>
                <td>班级</td>
                <td><input type="text" name="class"></td>
            </tr>
            <tr>
                <!--        <td> </td>-->
 <td><a href="index.php">返回</td>
                <td><input type="submit" value="添加"></td>
                <td><input type="reset" value="重置"></td>
            </tr>
        </table>
    </form>
</body>
</html>

The following is to submit the information we filled in on the page to action=add in action.php method to process and save the information to the database


Continuing Learning
||
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php include ('menu.php'); ?>
<h3></h3>
<form action="action.php?action=add" method="post">
<table>
<tr>
<td></td>
<td><input type="text" name="name"></td>
</tr>
<tr>
<td></td>
<td><input type="text" name="age"></td>
</tr>
<tr>
<td></td>
<td><input type="radio" name="sex" value=""></td>
<td><input type="radio" name="sex" value=""></td>
</tr>
<tr>
<td></td>
<td><input type="text" name="class"></td>
</tr>
<tr>
<!-- <td> </td>-->
<td><a href="index.php"></td>
<td><input type="submit" value=""></td>
<td><input type="reset" value=""></td>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
submitReset Code
图片放大关闭