Home  »  CodeSnippets   »   Check if is POST Request in PHP

Check if is POST Request in PHP

Posted: February 7, 2022 | by Site Host

Use the $_SERVER built-in global variable:

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    // your code here
}

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.

Share it!

See also  How to use Google Font Roboto