Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6960959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:28:06+00:00 2026-05-27T15:28:06+00:00

I consider $_GET and $_POST to be input in a web application written in

  • 0

I consider $_GET and $_POST to be input in a web application written in PHP. That’s because they contain values that the user can define and that “comes” along with the HTTP request. But are sessions and cookies the same?

This question came to me when I was reading the wikipedia PHP italian page that says that common inputs are $_GET, $_POST and $_SESSION.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:28:07+00:00Added an answer on May 27, 2026 at 3:28 pm

    If for input you mean “all the things coming in the request” (so, things that need validation, etc.), you should include:

    • POST/GET vars ($_POST, $_GET)
    • Cookies ($_COOKIE)
    • The request path ($_SERVER["REQUEST_URI"])
    • The HTTP method ($_SERVER["REQUEST_METHOD"])
    • The HTTP headers (usually in $_SERVER["HTTP_"*])

    The session is a special case since all the session variables are stored on the server-side, i.e. the user cannot modify them as it would with cookies. Anyways, a single cookie is saved on the client-side to store the session ID, that can be reset / set to a custom value by the user.

    Update – about $_REQUEST

    As pointed out, in PHP you also have access to $_REQUEST, that is a mix of variables from $_GET, $_POST, $_COOKIE.
    The exact content of $_REQUEST is determined by the request_order directive in php.ini.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In PHP it's possible to have arrays in $_GET , $_POST , $_COOKIE ,
I read that you do not need to validate or sanitize user's input if
Consider the following snippet: get '/hello/:name' do |n| Hello #{n}! end How can I
Consider the two following regular expression snippets and dummy HTML that it should be
I know that some people consider the presence of a leading underscore to imply
Does someone have any tips/advice on database design for a web application? The kind
Consider this simple example code: <form name=text id=frm1 method=post> <input type=checkbox name=name[] value=1000> Chk1<br>
What factors should I consider before adopting the Knockout JavaScript library for my application?
I have this script: <?php if ($_POST["username"]=="") { include($_SERVER['DOCUMENT_ROOT'] ."/login.inc.php"); } else { $username=$_POST["username"];
Using Flask Flask-sqlalchemy Sqlalchemy Jquery Datatables (jquery plugin) Jeditable (jquery plugin) Consider this user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.