Sjoerd wrote:
Erwin Moller:
I am unsure if it is correct to leave the action out.
Why not fix it and put the right action-value in?
The action is a required attribute, according to the W3C HTML 4.01
specification. User-agents use the current page as the action, so
setting action to $_SERVER['PHP_SELF'] would make it work and
standards-compliant.
To elaborate a bit (or add to the confusion). Above should, not so
obviously, be read as two separate statements, with a not so
straightforward relation.
PHP_SELF only contains the absolute path, not a full URI as specified
in the mentioned W3C document, which further says "This attribute
specifies a form processing agent. User agent behavior for a value
other than an HTTP URI is undefined.".
But as it is only a specification of a recommendation, the actual
implementation in user-agents is chosen in the finest tradition of
anarchism, leading to more or less convenient/sensible/ingenious
solutions, which in a competing market(governed by greed), tends to,
but certainly not always, conform with any common practice among the
general public (aka end-users), which in turn may or may not be
compliant to any would-like-to-be-normative specifications.
Consequently, ergo and vis-a-vis dubious intentions and demands, much
can be written in the action attribute, with the disappointing result:
"it works".
/Bent