[thelist] Form action = $PHP_SELF

Rodrigo Fonseca lists at vega.eti.br
Thu Oct 16 20:01:04 CDT 2003


Take care with that. You don't know what problems a browser will
have tomorrow. It's best to set the page you want instead of relying
on the browser to "guess" what you want. I can give you at least 3
reasons for not doing so:

1 - If the default behavior of the action attribute were to send the
request to the same page, then this attrib would not be required,
but it is. Your page/form won't validate without the action attrib.

2 - When using a link with a blank href, no matter how deep you are
in the directory structure, that link will point to the root dir if
a base href tag is included in the document. And will relate to the
document itself if no base href is present. What if you need to do
some changes? Are you going to search and replace all those attribs?
What about a 300 or 500 page website?

3 - Better safe than sorry! How can you tell your biggest client or
that employer you always wanted to contact you for an interview will
or not be using a browser that will interpret the action erroneously
and send the request to an error 404 page?

MSIE alone has more than 100 versions and Netscape Navigator has
more than 40, can you imagine how differently those browsers deal
with a lot of things?
Have any idea of what the next browser bug will be?

Just my 0.02 cents.

Best regards,

	Rodrigo Fonseca.

Joshua Hmielowski wrote:
> thanks for the input Rodrigo.
> 
> fortunately the first thing I tried was " action = ''  " .
> I guess leaving the action blank worked well for what I was trying to  
> do. everything was fine. (Thanks Roger)
> however I will be hanging on to your reply for further reference
> 
> Josh
> 



More information about the thelist mailing list