It doesn't appear that the name attribute is passed (ref: 
http://www.blooberry.com/indexdot/html/tagpages/f/form.htm). Instead, 
try including the following in each of your forms:

<input type='hidden' name='formname' value='formName1'>

Then you can check $formname in file.php for the value.

Hope this helps!

Kal Amry wrote:

> I have posted this question before so I'm giving another try in case new
> people are looking at the news list!!
> 
> If I have a form in  named formName1 such as:
> 
> <form name="formName1" action="file.php" method="post">
> 
> How can I get the name "formName1" from within file.php
> 
> My original question was:
> 
> Hi guys, If I have a code in file1.php such as:
> 
> <form name=formName1 action=file2.php method=post>
> code..........
> code..........
> </form>
> 
> And
> 
> <form name=formName2 action=file2.php method=post>
> code..........
> code..........
> </form>
> 
> Now in file2.php, I need to check which form I am receiving!! How do I
> check!!
> 
> In other words, let's assume we only have the form names "formName1" and
> "formName1" - What code I can use in file2.php to get the name of the
> calling form. I just want to know how can I get the name of the form (in the
> above case, formName1 or formName2)
> 
> Thanx
> 
> 
> 
> 


-- 
                _______      ___    _  ____  _____
Chris Hobbs   / ____\ \    / / |  | |/ ___\|  __ \
Head Geek    | (___  \ \  / /| |  | | (___ | |  | |
WebMaster     \___ \  \ \/ / | |  | |\___ \| |  | |
PostMaster    ____) |  \  /  | |__| |____) | |__| |
               \____/    \/    \____/ \____/|_____/
                   http://www.silvervalley.k12.ca.us
                       [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to