I am very much confused in the use of get and post method. Can anyone tell me when to use get and when o use post method. also, is there any character limit in any of them?
The get method puts all the variables in the URL itself but post works differently. Overall it's recommended to use get when you have short variables and also when you want the url to be accessed even without the use of form(i.e. by using a url like domain.com/?page=profile&user=test). you might also want to read this: http://www.cs.tut.fi/~jkorpela/forms/methods.html
but in that case it will be prone to hacking? as the variable like username or password will be accessible.
of course, you should never use get for user/pass, this way just by looking at the URL everyone'll know them!
Standard wise there is no limit but in practicality I don't think you can use more than 2000 chars in the URL. I personally think it's not any good to use inputs that each have more than 2-3 words in them with GET!