POST and GET confusion | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

POST and GET confusion

How do I know if the POST/GET forms are working? And where should I put a POST form is I'm already using a form. If your confused let me show you: <form> <input type = "text" name = "username"/> <br/> <input type = "password" name = "password"/> <form> So as I said, where in this code would I put a POST/GET form?

27th Aug 2016, 7:36 PM
Accomplice
Accomplice - avatar
4 Answers
+ 1
the main difference between POST and GET is how the content of form is send to server. while GET bundles the content of form to query string, POST packs it into request header. so using GET you can copy the query string (e.g. http://some.thing?a=1&b=2) and send it to a friend, whom should see exactly the same page as you do(this is just recommendation). there are other means of sending forms - PUT, DELETE. These are variations of POST by the way. However there are just recommendations on how to use these and you can experiment. just remember, there is a limit on how long querystring can be.
3rd Sep 2016, 8:59 AM
Jiří Tomeš
Jiří Tomeš - avatar
0
POST actually for Database systems. so for login and register. and GET for search system. ex. google. :)
28th Aug 2016, 12:05 AM
HawkEye
HawkEye - avatar
0
<form action="your_filename" method="post or get">
28th Aug 2016, 12:11 AM
Bibek Karki
Bibek Karki - avatar
0
In simple language, Post is for sending data to database server and Get is for receiving data from server.
2nd Sep 2016, 10:31 AM
Shraddha Vijay Magar