[PHP] Re: Form Name Attribute

2001-11-12 Thread Mike Harvey

I would use a hidden field and look for that variable.

--
 Mike
~~~
   MICHAEL R. HARVEY Sculptor
   Web Creation - http://vestudiohost.com
   Internet Business Tools - http://ibiz-tools.com
   Sculpture, Craft, Jewelry - http://sculpture-by-mrh.com
http://jewelry-by-mrh.com http://craft-by-mrh.com
   New Product Innovations and Development. Ph: 845-279-8295
Kal Amry [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 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





-- 
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]




[PHP] Re: Form Name Attribute Help!

2001-11-10 Thread jimw

Kal Amry [EMAIL PROTECTED] wrote:
 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

you can't. but you can add a hidden form field to each form to pass
along a value. for example:

form name=formName1 action=file.php method=post
input type=hidden name=form value=1 /
...
/form

(then you can just access $form in file.php to figure out which form was
submitted.)

jim

-- 
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]