Those of you coming to this book from a design or editorial background may be anxious to know: how the heck do forms work on a round-trip basis? (That was my first question when I started on my first big web application project in 1999, anyway.) There are also some oddities of form markup and behavior that are well known to experienced developers, but might not be familiar to all readers.
If you’ve spent much time around form markup, you’ve surely noticed that every
form element has an
action attribute, and every field element has a
name attribute. The latter are paired with
value values, and
encoded by the browser in the following manner:
That’s the literal submission to the web server, which in normal language reads “Hello World!”
There are two reliable methods for sending this data to the
get appends the encoded data
to the URI specified in the form’s
action attribute, resulting in a destination
Note the literal
? that separates the data submission from the name of the
requested resource—in this case, a script named
printmystuff.php in the root folder of the
host’s public filesystem.
value pairs are separated by literal
characters, as follows:
Even though the resulting URIs ...