#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    1
    Rep Power
    0

    POST and REQUEST


    What is the difference between POST and REQUEST method?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,350
    Rep Power
    594
    $_REQUEST contains: $_COOKIE, $_GET, and $_POST variables

    If you use $_REQUEST you have no guarantee that the data came from the post data, which leads to security holes in your script.

    Normally you should not use $_REQUEST.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,957
    Rep Power
    1046
    Hi,

    Originally Posted by gw1500se
    If you use $_REQUEST you have no guarantee that the data came from the post data, which leads to security holes in your script.
    Why should that lead to security holes??

    It's a myth that data sent via POST is somehow "more secure" than URL parameters. Anybody can send any request to any receiver, so there's no difference from a site owner's perspective.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,350
    Rep Power
    594
    I did not mean to imply that $_POST was secure. Just that using $_REQUEST makes is easier to mess with variables.
    Last edited by gw1500se; January 19th, 2013 at 01:18 PM.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.

IMN logo majestic logo threadwatch logo seochat tools logo