You are here: Re: [PHP] Switch Form « PHP « IT news, forums, messages
Re: [PHP] Switch Form

Posted by Richard Lynch on 02/02/05 01:48

Lancer Emotion 16 wrote:
> <form name='form1' action='page.php' method='Post'>
> </form>
>
> <form name='form2' action='page.php method='Post''>
> </form>
>
> Now, in page.php is possible to do a switch of form name? Something like
> this :
>
> Switch ($_POST['form'] {
> 'form1' : ...
> 'form2' : ...
> }
>
> If this is possible,i dont know how to call it, can you help me please?

The NAME attribute on a FORM tag is not sent via HTTP by any browser.

W3C HTML 4.01 spec says it's only there "style sheets or scripts" but is
only there for compatibility and you should use id attribute -- which is
ALSO not sent by any browser I know of.

Perhaps the spec should read "client scripts" since clearly these are
useless for server scripts dealing with the submitted form, if you read
the form submission specification.

Assuming you can stay awake enough to read that sucker... :-)

To solve your problem, you'll need to have <INPUT TYPE="HIDDEN"
NAME="form" VALUE="form1"> on the first form and use form2 on the second
form.

--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this 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

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