RE: Switch Form

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
Hi list,I have 2 forms :

<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?
[/snip]

Do this... 

<form name='form1' action='page.php' method='Post'>
<input type='submit' name='action' value='Button 1'>
</form>

<form name='form2' action='page.php method='Post''>
<input type='submit' name='action' value='Button 2'>
</form>

switch ($_POST['action]){
	case "Button 1":
	...stuff...
	break;

	case "Button 2";
	...stuff...
	break;
}

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux