Reply to Re: when action =

Your name:

Reply:


Posted by Jonathan N. Little on 02/12/07 21:19

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 = 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="post" action="<?php echo $_SERVER['REQUEST_URI']"; ?>">

More typically:

<?php echo $_SERVER['PHP_SELF']; ?>

or

<?php echo 'http://' .$_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF']; ?>



--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация