|
Posted by Rik on 02/12/07 21:34
Jonathan N. Little wrote:
> Rik wrote:
>> On Mon, 12 Feb 2007 21:44:25 +0100, Bob <jhgjhg@albo.net> wrote:
>>
>>> On Mon, 12 Feb 2007 21:42:27 +0100, Rik
>>> <luiheidsgoeroe@hotmail.com> wrote:
>>>>
>>>> Most browers default to the same page indeed. I haven't seen it in
>>> the
>>>> spec though,so if I wouldn't advise to using it like that.
>>>
>>> Thank you. Would that be considered a sophisticated technique, or
>>> something that a stumbling beginner would likely be to do?
>> I'd say very lazy coders that trust some browser behaviour.
>> http://www.w3.org/TR/html4/interact/forms.html#h-17.3
>> "action =3D uri [CT]
>> This attribute specifies a form processing agent. User agent behavior=
=
>> for a value other than an HTTP URI is undefined."
>>
>>> The page that contains the script is a php page.
>> In that case it's in most cases even easier to define the url, no =
>> matter where you include the form:
>> <form method=3D"post" action=3D"<?php echo $_SERVER['REQUEST_URI']";=
?>">
>
> More typically:
>
> <?php echo $_SERVER['PHP_SELF']; ?>
>
> or
>
> <?php echo 'http://' .$_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF']; =
?>
Depends. I've had better results with the REQUEST_URI, as it's definitel=
y =
the request coming in, rather then where the user ended up after possibl=
e =
rewriting etc. I'd rather the user still saw his entered URL then for =
instance a whole bunch of GET variables working behind the scene.
-- =
Rik Wasmus
Navigation:
[Reply to this message]
|