zoukankan      html  css  js  c++  java
  • 2014-04-23 总结

     $_GET和$_POST

    $_GET 变量用于收集来自 method="get" 的表单中的值,对任何人都是可见的(会显示在浏览器的地址栏),并且对发送的信息量也有限制(最多 100 个字符)。

    例子
    <form action="a.php" method="get">
    姓名: <input type="text" name="name" />
    年龄: <input type="text" name="age" />
    <input type="submit" />
    </form>

    在使用 $_GET 变量时,所有的变量名和值都会显示在 URL 中。所以在发送密码或其他敏感信息时,不应该使用这个方法。不过,正因为变量显示在 URL 中,因此可以在收藏夹中收藏该页面。

    $_POST 变量用于收集来自 method="post" 的表单中的值。对任何人都是不可见的(不会显示在浏览器的地址栏),并且对发送信息的量也没有限制。

    例子
    <form action="a.php" method="post">
    姓名: <input type="text" name="name" />
    年龄: <input type="text" name="age" />
    <input type="submit" />
    </form>

  • 相关阅读:
    Nim or not Nim? hdu3032 SG值打表找规律
    Maximum 贪心
    The Super Powers
    LCM Cardinality 暴力
    Longge's problem poj2480 欧拉函数,gcd
    GCD hdu2588
    Perfect Pth Powers poj1730
    6656 Watching the Kangaroo
    yield 小用
    wpf DropDownButton 源码
  • 原文地址:https://www.cnblogs.com/zouyajun/p/3684050.html
Copyright © 2011-2022 走看看