Re: Perhaps an incomplete $_POST

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To the best of my knowledge, the "name" attribute of the FORM tag is
never submitted with the request, whether it be GET or POST. It's
there for client-side scripting (JavaScript, etc.) only.

One trick that might help you - if your form action is POST, add a
querystring to the action, something like "foo.php?formname=foo", then
check $_GET['formname']. Of course, it might be just as easy to drop
in a hidden input instead.

Hope this helps.

On 8/29/07, Jay Blanchard <jblanchard@xxxxxxxxxx> wrote:
> I just noticed something a little odd, and maybe there is a simple
> solution. Given a form;
>
> <form name="foo" action="foo.php" method="POST">
>
> The attributes, especially the name "foo", never appear in any variables
> array. I am thinking that this might be handy to have for several
> reasons when processing the form. I have several reasons for needing the
> information, does anyone know how to get this in the processing script
> without having to add hidden fields or do some Ajax magic?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux