php check request method
snippet in php

php detect request type

user5867

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
     // Boom baby we a POST method
}
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
     // We are a GET method
}

php check request method

user6535

$_SERVER['REQUEST_METHOD']