Difference between GET and POST Methods in PHP

Difference between GET and POST Methods in PHP

GET Method
POST Method
Information sent from a form with the GET method form with the POST is invisible to is visible to everyone (all method variable names and values  are display in th URL)
Information sent from a form with the POST is invisible to is visible to everyone (all names/values are embedded within the body of the HTTP request)
GET has limits on the  amount of information to send. The limitation about 2048 characters..
Post has no limits on the amount of information  send. 
$_GET is an array of variables passed to the current script via the URL parameters.
$_POST is an array of variables passed to the current script via the HTTP POST method.
Can be bookmarked
Cannot be bookmarked
Can be cached
Not cached
Parameters remain in browser history
Parameters are not saved in browser history
Only ASCII characters allowed
No restriction, Binary data is also allowed
GET is less secure compared to POST because data sent is part of the URL. So it's saved in browser history and server logs in plaintext.
POST is a little safer than GET because the parameters are not stored in browser history or in web server logs
GET method should not be used when sending passwords or other sensitive information.
POST method used when sending passwords or other information
Easier to hack for script kiddies
More difficult to Hack

Comments