lcruz Posted March 23, 2006 Share Posted March 23, 2006 I am little bit confused, i dont know where i need to use POST or use GET, could anyone gave me a tip where is recommended to use one of those, thnk you Quote Link to comment https://forums.phpfreaks.com/topic/5590-difference-post-and-get/ Share on other sites More sharing options...
wildteen88 Posted March 23, 2006 Share Posted March 23, 2006 You only use POST when you use [b]post[/b] as the [b]method[/b] you wish to submit a form. ie:[code]<form action="test.php" method="post"><input type="textbox" name="name"><br /><input type="submit" name="submit" value="Submit Name"></form>[/code]If you dont use the mothod attribute within your html form tag then you will need to use GET. As the information is being submitted over the url. You can also use the GET mothod with links:[code]<a href="test.php?var1=hello&var2=world">Some link</a>[/code]You are setting two variables which are var1 and var2 in order to retrieve the value of these variables you use the following code $_GET['var1'] and $_GET['var2'] Quote Link to comment https://forums.phpfreaks.com/topic/5590-difference-post-and-get/#findComment-19940 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.