php - If I use GET with a Front Controller, does this mean I must use GET for all forms? -
I have a front controller class I in that class I have the function of parsing a URL:
< Pre> public event parseURL (if {isset ($ _ receive ['url'])) {return $ url = explosion ('/', filter_var (rtrim ($ _ ['url'], ' / '), FILTER_SANITIZE_URL)); }}
This is based on a rewriting (I imported anyway in IIS):
Option -Multiviews RewriteEngine at RewriteBase / RewriteCond% , {} REQUEST_FILENAME! -d RewriteCond% {REQUEST_FILENAME}! -f RewriteRule ^ (. +) $ Index.php? Url = $ 1 [QSA, L]
Now it means all of my forms is needed to use GET?
& lt; Form action = "/ controller / action" method = "GET" & gt;
Does not everything go through the front controller, even my CRUD?
/ Administrator / Action / ID
, for example.
If it means that I am using IIS. There is no hidden information for me to put, remove, etc. I am not currently using AJX.
No, your form can still use the mail. I recommend that you use forms Do not use GET while submitting the values of the form in the form of polluting your URL.
You can also use your GET fine attributes
. & Lt; Form action = "/ controller / action / id" method = "post" & gt; & Lt; Input type = "article" name = "some text" /> & Lt; In PHP, do your business as usual: $ input type = "present />
_POST [echo 'someText']; // echo form control echo input $ _GET ['url']; // echo "/ controller / action / id"
Comments
Post a Comment