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

  • Home
  • SEARCH
  • 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 7067467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:12:20+00:00 2026-05-28T05:12:20+00:00

As title. Also, I just use file_get_contents(php://input) to get them. Also, I am just

  • 0

As title.

Also, I just use file_get_contents(php://input) to get them.
Also, I am just confused about how to use $_POST and $_GET in php, even after long time of learning in web!

As I know, they are array, but in many examples, I see people put in the key like

$_POST['key']

But what defines the key and its corresponding value?
Now I am not getting html form from client, but the examples in internet mainly deal with that.

Hope someone can get my questions, and show some examples and solution to me , thanks!

  • 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-28T05:12:20+00:00Added an answer on May 28, 2026 at 5:12 am

    There’s $_SERVER['REQUEST_METHOD'], which when run in SAPI mode will ALWAYS contain the method of the HTTP request: GET, POST, DELETE, HEAD, etc…. Using this $_SERVER var is 100% reliable. Checking for the presence/absence of form fields is unreliable, especially if you’re modifying the form – one typo on either side and your code fails because what’s being looked for doesn’t exist anymore.

    if ($_SERVER['REQUEST_METHDO'] == 'POST') {
       $val = $_POST['somefield'];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just as the title said. What ways do you use to test your own
I just updated from php 5.3.4 to 5.3.8. After the update it seems that
I am trying to send the UIWebView page Title to UINavigationBar. I would also
so I'm using CURL to replace the file_get_contents and get_meta_tags functionality in PHP: <?php
I just started to play with the PHP framework lithium (v 0.10). I followed
I am trying to get a DynaTree (first use of it) working w/o luck
Title is the entire question. Can someone give me a reason why this happens?
Title says what i'm trying to do. I can successfully generate an assembly if
Title says it mostly. I want to add a simple extension method to the
Title might be a bit confusing, so let me explain. I have a website

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.