| | #1 |
| Warrior Member Join Date: 2013
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
|
I want get the difference please tell actual
|
| | |
| |
| | #2 |
| VIP Warrior Join Date: 2005 Location: Potemkin Village
Posts: 1,724
Thanks: 745
Thanked 742 Times in 498 Posts
|
There's some good answers here: http://stackoverflow.com/questions/1...n-get-and-post |
|
:)
| |
| |
| | #3 |
| Warrior Member Join Date: 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
GET is the data sent to the server in the URL: For example: SOMETHIGN.com?a1=data&a2=moredata so the server get's the array: [a1=>data, a2=>moredata] Post is data sent through the HTTP and it is not visual to the user. |
| |
| | #4 |
| Warrior Member Join Date: 2013
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
|
Hello The basic difference between $_get and $_post is In the $_get method is restricted to send upto 1024 characters only and the PHP provides $_get associative array to access all the sent information using GET method.Other hand $_Post method does not have any restriction on data size to be sent and the post method can be used to send ASCII as well as binary data.The PHP provides $_Post associative array to access all the sent information using POST method. |
| |
| | #5 |
| Warrior Member Join Date: 2013
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
|
$_GET, $_POST and $_REQUEST all these variables are predefined variables in php. Normally we have 2 methods to send the data to one page to another page. Those methods are nothing but GET and POST methods. Using this variable we can get the data by specifying the variable name for example, $_GET['name'], $_POST['email'] and $_REQUEST['phone']. Using GET method: we can get the data from URL Example: www.example.com/index.php?name=phptag Now from the above URL if you want to get the phptag value see the code below <?php $name = $_GET['name']; //or $name = $_REQUEST['name']; ?> Using POST method: we can get the in hidden mode, that means we cannot see the data in URL it will carry through the headers. Normally we can use the post method by implementing the html form's see the code below <form name='phptag' method='post'> <input type='text' name='name' value='phptag'> <input type='submit' name='demo' value='Click' > </form> <?php $name = $_POST['name']; //or $name = $_REQUEST['name']; ?> Please visit connected commerce site have used lot of post and get methods. In the above examples the common thing that we have used is $_REQUEST which means it can be used for both GET and POST methods to get the data. |
| | |
| |
| | #6 | |
| Active Warrior War Room Member Join Date: 2013
Posts: 48
Thanks: 0
Thanked 9 Times in 9 Posts
|
| |
| |
| | #7 |
| HyperActive Warrior War Room Member Join Date: 2013
Posts: 117
Thanks: 205
Thanked 14 Times in 14 Posts
|
It is mostly how the script reacts to the data.$get is pass it as visual to the user while $post is to pass it as http and hidden to the user.Obviously,$post is safer than $get protocol, who wants their information being posted on the site they visit.
|
|
Number 11 is lucky in snake & ladders.
| |
| |
| | #8 |
| Web Developer War Room Member Join Date: 2012 Location: Vancouver, BC
Posts: 593
Thanks: 149
Thanked 162 Times in 133 Posts
|
It amazes me how much people 'think' they know (and how positive they seem in their answers). ~%20 of information in these responses is incorrect. $_GET = PHP: $_GET - Manual $_POST = PHP: $_POST - Manual $_REQUEST = PHP: $_REQUEST - Manual |
| |
| |
| | #9 | |
| Monkey War Room Member Join Date: 2013 Location: Vantaa, Finland
Posts: 4,324
Thanks: 336
Thanked 697 Times in 617 Posts
|
Sure, the variables aren't visible in your address bar, and it might be harder to get the data from your browser history, but these are just side effects. | |
| Links in signature will not help your SEO. Not on this site, and not on any other forum. Who told me this? An ex Google web spam engineer. What's your excuse? | ||
| |
|
| Bookmarks |
| Tags |
| $get, $post, difference, php |
| |