You are here: Re: [PHP] Getting form name « PHP « IT news, forums, messages
Re: [PHP] Getting form name

Posted by Leif Gregory on 09/30/89 11:11

Hello j,

Tuesday, March 22, 2005, 10:13:50 AM, you wrote:
j> I'm trying to get the name of a form. I tried the following code,
j> but I guess the data in $_POST only contains data on the form
j> elements that go inside the form tags, but not info from the form
j> tag itself. Any suggestions on how to get the form name?

j> echo "<form name=\"myForm\" action=\"test.php\" method=\"POST\" value=\"AAA\">"$

IIRC, form name is not sent by any browser, so it won't show up in
POST / GET / COOKIES or anywhere else. The easiest way is to set a
hidden field which contains that information..

i.e.

<input type="hidden" name="formName" value="myForm" />


--
Leif (TB lists moderator and fellow end user).

Using The Bat! 3.0.9.7 Return (pre-beta) under Windows XP 5.1
Build 2600 Service Pack 2 on a Pentium 4 2GHz with 512MB

 

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

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