Problem Description
> **Possible Duplicate:**
> [PHP detecting request type (GET, POST, PUT or DELETE)](https://stackoverflow.com/questions/359047/php-detecting-request-type-get-post-put-or-delete)
<!-- End of automatically inserted text -->
This should be an easy one.
I have a script, and in the script I want to determine whether the request arrive via `GET` or `POST` method.
What is the correct way to do it?
I am thinking of using something like this
if (isset($_POST)) {
// do post
} else {
// do get
}
But deep in my heart I don't feel this is the right way. Any idea?
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?