And lo, Michael didst speak in alt.www.webmaster:
> Can anyone describe what the following form action code means:
>
> <form action="?formsubmit=1" method="post">
The action attribute of the form describes the URI to which the form
contents will be submitted. In this case, the URI is a relative one which
begins with the query string. Essentially it means: "submit the form to
the current URI, but tack on '?formsubmit=1' to the end of it"
Thus if the URI of the form is
www.example.com/form.php, then the form
will be submitted, via the POST method, to
www.example.com/form.php?formsubmit=1
This is a sneaky way of submitting both POST and GET variables at the same
time. In PHP, this means that the REQUEST_METHOD will be set to POST, but
the GET variable "formsubmit" will be set to 1.
> I'm not familiar with the "?formsubmit=1" portion of the code. This is
> contained in a website I will be inheriting. As the form in context
> does not appear to work (it simply redisplays the form page without
> any indication of success or failure).\
There is nothing wrong with the form code. It is likely the server-side
code which accepts the form input is not recognizing that the form has
been submitted.
> As I have found other instances
> of incorrect or deprecated tag structures elsewhere in the website,
> I'm not sure how much credence to give this syntax. At best I assume
> some script name is intended to appear immediately before the question
> mark with the following as a parameter. Is this analysis correct, or
> am I unaware of something?
It is nothing so complex. It is simply the query string end of a relative
URI.
Grey
--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollary that nothing is ridiculous.
-
http://www.greywyvern.com/orca#search - Orca Search: Full-featured
spider and site-search engine