• PhP 提交表单作业,student.php 有几处提交表单信息不正确,争取在上PHP之前解决掉!!!



    <html>
    <head>
    <title >学生成绩展示</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <style type="text/css">
    body {
    margin-left: 1px;
    }
    </style>
    </head>
    <body>
    <form action="submitstudent.php" method="post">
    <table bgcolor="green" align="center">
    <caption bgcolor="#CCCCCC" align="center"><h2>学生信息表息</h2></caption>
    <tr>
    <th align="left">学号:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="ID" size="20" /></th>
    </tr>
    <tr>
    <th align="left"> 姓名:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="name" size="20" /></th>
    </tr>
    <tr>
    <th align="left">性别:&nbsp;&nbsp;&nbsp;&nbsp;男<input type="radio" name="sex" />女<input type="radio" name="性别" /></th>
    </tr>
    <tr>
    <th> 出生年月日:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="birthday" size="20" /></th>
    </tr>
    <tr>
    <th align="left" name="class"> 所学课程:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <select name="addr">
    <option value="1">计算机导论</option>
    <option value="2" selected>数据库原理</option>
    <option>数据库结构</option>

    </select></th>
    </tr>
    <tr>
    <th align="left" name="major"> 所学专业:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <select>
    <option>计算机</option>
    </select>
    </th>
    </tr>
    <tr>
    <th align="left"> 备注:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <textarea cols="20" name="Remarks"></textarea></th>
    </tr>
    <tr>
    <th align="left"> 兴趣:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="checkbox" value="1" name="Interesting"/>听音乐
    <input type="checkbox" value="1" name="Interesting"/>看小说
    <input type="checkbox" value="1" name="Interesting"/>上网
    </th>
    </tr>
    <tr>
    <th align="left">重置 <input type="reset"> 提交 <input type="submit">
    </th>
    </tr>

    </table>
    </form>
    </body>
    </html>
    <?php

    <html>
    <body>
    学号: <?php echo $_POST["ID"]; ?><br>
    姓名: <?php echo $_POST["name"]; ?><br>
    性别:<?php echo $_POST["sex"]; ?><br>
    出生年月日: <?php echo $_POST["birthday"]; ?><br>
    所学课程:<?php echo $_POST["class"]; ?><br>
    所学专业: <?php echo $_POST["major"]; ?><br>
    备注: <?php echo $_POST["Remarks"]; ?><br>
    兴趣: <?php echo $_POST["Interesting"]; ?><br>
    </body>
    </html>


    This moment will nap, you will have a dream; but this moment study, you will interpret a dream.
  • 相关阅读:
    k8s-基础入门
    Compose编排Spring Cloud微服务2
    Compose 编排 SpringCloud微服务
    Docker Compose 编排微服务
    首篇博客
    Vue--计算属性和侦听器
    Vue--事件处理--事件修饰符
    css 盒子模型理解
    移动前端开发之viewport的深入理解
    js中几种实用的跨域方法原理详解
  • 原文地址:https://www.cnblogs.com/mawenqi-barry/p/8597831.html
Copyright © 2020-2023  润新知