Sprawdź, czy żądanie PHP
Better use $_SERVER['REQUEST_METHOD']:
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// …
}
Lokesh003Coding
Better use $_SERVER['REQUEST_METHOD']:
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// …
}
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Boom baby we a POST method
}
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
// We are a GET method
}
if($_SERVER['REQUEST_METHOD'] == 'POST') {}
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
// We are a GET method
}