Passing information to PHP programs using a
GET is useful for most situations in which you want to send information to a server-side program and when that information will easily fit in a URL. Sometimes, however, you want to send more information than can easily be put into a URL. For those cases, it's best to use the
POST method to send information to a server-side program.
POST method is usually used in combination with an HTML form, such as the one shown in Figure 16-11.
Figure 16-11. A typical HTML form
The code for the standard HTML form shown in Figure 16-11 might look like this:
<form method = "POST" action = "