+ 1

$_POST & $POST

what different : $_POST & $POST, and other, for example, GET

12th Mar 2017, 8:31 AM
Pavel Grekoff
Pavel Grekoff - avatar
3 Réponses
+ 8
$_POST is an array and so is $_GET. If a user submits a form and the method is set as GET then data will be in the $_GET array, and vice a versa for POSTed data. $_REQUEST is also reasonable to get data whatever the method, but I recommend against it.
12th Mar 2017, 3:07 PM
Mark Foxx
Mark Foxx - avatar
+ 7
Post and Get are similar as they both submit data. Post is more secure than Get because it doesn't send the data in the URL for all to see like: http://site.com/?user_id=78678&user_pass=mySecurePassword123 Anyone can see this, and it contains sensitive material. Post would've handled it better sending data in the message body of the HTTP request instead, and it will not be in the action URL. Another important thing to note is that Get requests remain in the browser history, and Post doesn't. Get requests can be bookmarked, and Post can't. Post wins by far, as you don't want to accidentally send a link to someone with your details in it giving them full access to site our application.
12th Mar 2017, 2:50 PM
Mark Foxx
Mark Foxx - avatar
+ 1
i know this, but i not understand, what different : $_get and $get
12th Mar 2017, 2:54 PM
Pavel Grekoff
Pavel Grekoff - avatar