php check if came with post 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') {
// …
}