SyntaxFix
Write A Post
Hire A Developer
Questions
Better use $_SERVER['REQUEST_METHOD']:
$_SERVER['REQUEST_METHOD']
if ($_SERVER['REQUEST_METHOD'] === 'POST') { // … }