• 表单的提交获取


    表单数据如何提交给php文件

    <form action="del.php" method="post">

    1.text数据

    <input type="text" name="username">

    2.password数据

    <input type="password" name="pwd">

    3.radio单选框

    <p>选择科目</p>
    <p>
    </label>
    <input type="radio" name="kemu" value="php">php</label>
    </p>
    <p>
    <label>
    <input type="radio" name="kemu" value="java">java
    </label>
    </p>

    4.checkbox多选数据

    <p>选则爱好</p>
    <p>
    </label>
    <input type="checkbox" name="love[]" value="wan">wan</label>
    </p>
    <p>
    <label>
    <input type="checkbox" name="love[]" value="chi">chi
    </label>
    </p>
    <p>
    <label><input type="checkbox" name="love[]" value="he">he</label>
    </p>

    5.select下拉菜单数据

    <p>选择地点</p>
    <p>
    <select name="city" id=''>
    <option>bj</option>
    <option>sz</option>
    <option>sh</option>
    </select>
    </p>

    6.textarea文本与数据

    <textarea name="mess"></textarea>

    7.提交按钮

    <input type="submit" value="ok">
    <input type="reset" value="cancel">

    php接收

    <?php
    echo "<pre>";
    print_r($_POST);
    echo "</pre>";

    ?>

    勤学似春起之苗,不见其增,日有所长; 辍学如磨刀之石,不见其损,日所有亏!
  • 相关阅读:
    Oracle数据库学习(四)
    近期整理
    2020/5/29
    2020/5/26
    2020/5/25
    2020/5/22
    2020/5/16
    2020/5/15
    2020/5/14
    2020/5/13
  • 原文地址:https://www.cnblogs.com/qiaozhiming123/p/12769479.html
Copyright © 2020-2023  润新知