• +91 9723535972
  • info@interviewmaterial.com

PHP Interview Questions and Answers

Question - What are "GET" and "POST"?

Answer - GET and POST are methods used to send data to the server: With the GET method, the browser appends the data onto the URL. With the Post method, the data is sent as "standard input." Major Difference In simple words, in POST method data is sent by standard input (nothing shown in URL when posting while in GET method data is sent through query string. Ex: Assume we are logging in with username and password. GET: we are submitting a form to login.php, when we do submit or similar action, values are sent through visible query string (notice ./login.php?username=...&password=... as URL when executing the script login.php) and is retrieved by login.php by $_GET['username'] and $_GET['password']. POST: we are submitting a form to login.php, when we do submit or similar action, values are sent through invisible standard input (notice ./login.php) and is retrieved by login.php by $_POST['username'] and $_POST['password']. POST is assumed more secure and we can send lot more data than that of GET method is limited (they say Internet Explorer can take care of maximum 2083 character as a query string).

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners