The <FORM> Tag’s ACTION Attribute
When
an HTML form is submitted, the
contents of all the form’s fields are bundled up and handed off
to whatever script is specified in the ACTION
attribute of the <FORM> tag. In the previous
example page, the form is handed off to a script called
mail_form.cgi located in the same directory as the
form itself.
If you wanted to, you could have put some path information into the
ACTION attribute and handed the form off to a
script in a different directory. You could even have given a full URL
(http://www.somewhere.com/somepath/somescript.cgi)
and handed the form’s contents off to a script on a completely
different server. But I’m digressing. The point is, the
ACTION attribute of the
<FORM> tag is what determines where the form
data goes when the form is submitted.