php HTTP_METHOD code example
Example 1: php http method
$_SERVER['REQUEST_METHOD'];
Example 2: get http method php
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// The request is using the POST method
}
$_SERVER['REQUEST_METHOD'];
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// The request is using the POST method
}