Properly separate the HTTP GET requests from the POST requests
[Project_webapp.git] / lib / utils.php
diff --git a/lib/utils.php b/lib/utils.php
new file mode 100644 (file)
index 0000000..e6e0365
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+function isPostRequest() {
+    if (filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'POST') {
+        return true;
+    } else {
+        return false;
+    }
+}
+?>