博客列表 >GET/POST 原理与实现 -4.15

GET/POST 原理与实现 -4.15

太早的博客
太早的博客原创
2019年04月19日 12:29:30604浏览

1.png



实例

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <form action="" method="get">
        <label for="email">邮箱:</label>
        <input type="email" id="email" name="email" value="">
        <label for="password">密码:</label>
        <input type="password" id="password" name="password" value="">
        <button>登录</button>
    </form>
</body>
</html>
<?php
print_r($_GET);

运行实例 »

点击 "运行实例" 按钮查看在线实例


实例

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<form action="" method="post">
    <label for="email">邮箱:</label>
    <input type="email" id="email" name="email" value="">
    <label for="password">密码:</label>
    <input type="password" id="password" name="password" value="">
    <button>登录</button>
</form>
</body>
</html>
<?php
print_r($_POST);

运行实例 »

点击 "运行实例" 按钮查看在线实例


声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议