Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between GET and POST methods? [duplicate]

I'm new in this forum and I'm learning PHP from this night.

I want to send a form but I do not know the difference between:

<form action="page2.php" method="GET">

and

<form action="page2.php" method="POST">

Anyone could help me please ?

Thanks.

like image 234
Johny G Avatar asked Mar 02 '13 03:03

Johny G


1 Answers

GET:

  • Parameters remain in browser history because they are part of the URL
  • Can be bookmarked.
  • GET method should not be used when sending passwords or other sensitive information.
  • 7607 character maximum size.
  • Url example: page2.php?category=sport

POST:

  • Parameters are not saved in browser history.
  • Can not be bookmarked.
  • POST method used when sending passwords or other sensitive information.
  • 8 Mb max size for the POST method.
  • Url example: page2.php
like image 112
F__M Avatar answered Sep 23 '22 02:09

F__M