how to check request is post in php code example
Example: check if post request php
Better use $_SERVER['REQUEST_METHOD']:
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// …
}
Better use $_SERVER['REQUEST_METHOD']:
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// …
}