Give your forms unique names.

-- form page --
<form name=form1 method=post action=whatever.php>
<form name=form2 method=post action=whatever.php>
<form name=form3 method=post action=whatever.php>

-- whatever.php --
if ($_POST["form1"] == "Submit") { do something;}
elseif ($_POST["form2"] == "Submit") { do something else;}
elseif ($_POST["form3"] == "Submit") { do something creative;}
else {
die("no form submitted");

Jim

----- Original Message ----- 
From: "php" <[EMAIL PROTECTED]>
To: "Php" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 4:19 PM
Subject: [PHP] picking up a form name


| Hi,
| 
| If I have more than one form on a page, how can I get the 
| name of the form that was sent on the recieving page 
| without using javascript?
| 
| tia,
| Craig
| 
| ====================
| TOP DRAW INC.
| ====================
| p  780.429.9993
| f  780.426.1199                   
| [EMAIL PROTECTED]
| www.topdraw.com
| 
| 10210 - 111 Street,  
| Edmonton,  Alberta   
| T5K 1K9
| ====================
| 
| -- 
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, visit: http://www.php.net/unsub.php
| 
|

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

Reply via email to