Hello which is the basic difference between the " Get " and " Post " method ? where we need to use " Get " and " Post " method ? thanks ayaz ali
Use Post is more safe than Get. Get is showing your parameter data in url (ex: www.yoursite.com?id=1 )
Get and Post are both just ways to submit information over to another page, neither is more secure than the other because neither of them encrypt the data. Get is used for simpler queries, like searches (i.e. search.php?q=when+to+use+get) as Get is shown in the URL and information can be retrieved by $_GET. Post is used when you submit more information, as in an order form, and the information can be retrieved by $_POST. Both can be retrieved by using $_REQUEST.
That depends what you are sending. If you are sending login details e.g. a password, the user is going to be pretty mad if they suddenly see that appear in the URL. GET is also limited on the amount of information you can send, the length of your post string can be way longer than get. Basically use GET if it doesn't matter if the user can see the parameters and you would like the user to revisit that page by pasting the URL in the address bar. Use POST if you will be exceeding GET's limit, posting sensitive information or you don't want the user to be able to repeat the process by simply pasting a URL.