repositories
/
Project_webapp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
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
+++ b/
lib/utils.php
@@ -0,0
+1,9
@@
+<?php
+function isPostRequest() {
+ if (filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'POST') {
+ return true;
+ } else {
+ return false;
+ }
+}
+?>