{"id":11867,"date":"2022-02-07T21:42:51","date_gmt":"2022-02-08T02:42:51","guid":{"rendered":"http:\/\/local.brightwhiz\/?post_type=snippets&p=11867"},"modified":"2022-02-07T21:42:52","modified_gmt":"2022-02-08T02:42:52","slug":"check-if-is-get-request-php","status":"publish","type":"snippets","link":"http:\/\/local.brightwhiz\/snippets\/check-if-is-get-request-php\/","title":{"rendered":"Check if is GET Request in PHP"},"content":{"rendered":"\n
Use the $_SERVER<\/code> built-in global variable:<\/p>\n\n\n\n
if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n \/\/ your code here\n}<\/code><\/pre>\n","protected":false},"comment_status":"open","ping_status":"closed","template":"","meta":[],"categories":[953,15],"tags":[954,452,471],"yoast_head":"\n