{"id":11866,"date":"2022-02-07T21:40:22","date_gmt":"2022-02-08T02:40:22","guid":{"rendered":"http:\/\/local.brightwhiz\/?post_type=snippets&p=11866"},"modified":"2022-02-07T21:40:24","modified_gmt":"2022-02-08T02:40:24","slug":"check-if-is-post-request-php","status":"publish","type":"snippets","link":"http:\/\/local.brightwhiz\/snippets\/check-if-is-post-request-php\/","title":{"rendered":"Check if is POST 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