shivani.shm Posted March 14, 2008 Share Posted March 14, 2008 which one is better GET or POST Quote Link to comment https://forums.phpfreaks.com/topic/96099-get-or-post/ Share on other sites More sharing options...
haku Posted March 14, 2008 Share Posted March 14, 2008 There is no 'better' or 'worse', they simply do different things at different times. With get, all variables that are typed into form fields will appear in the URL on the next page. That means that if you have sensitive information, it will be seen. There is also a limit to the number of characters that can be in a URL, so if you have too much information in your form, they wont all fit in get. However, if you have a form and you want people to be able to link to the results, then get is the way to go. With post, the information wont be visible in the URL, so its (a little) more secret. It can also handle a lot more data than GET. However, people wont be able to link to the results of post searches. Quote Link to comment https://forums.phpfreaks.com/topic/96099-get-or-post/#findComment-491947 Share on other sites More sharing options...
shivani.shm Posted March 14, 2008 Author Share Posted March 14, 2008 thks for the reply i thk tht clears my doubt......... Quote Link to comment https://forums.phpfreaks.com/topic/96099-get-or-post/#findComment-491950 Share on other sites More sharing options...
TheFilmGod Posted March 15, 2008 Share Posted March 15, 2008 What about $_SESSION? $_GET should only be used when it helps navigation. Like a profile. You use the Get option to extract the id number and output the correct profile. Use Post almost always. $_SESSION should be used be used for data held within a session or a user visit. Hope that helps! Quote Link to comment https://forums.phpfreaks.com/topic/96099-get-or-post/#findComment-492919 Share on other sites More sharing options...
unsider Posted March 18, 2008 Share Posted March 18, 2008 And to educate you further, use cookies if you want to store preferences. Assume you give them an option to change the BG color, use a cookie to store that BG color value. But don't store passwords, or any important info, can easily be exploited. Quote Link to comment https://forums.phpfreaks.com/topic/96099-get-or-post/#findComment-494704 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.