Forums

PHP

This topic is locked

Multiple Submit Buttons on one form

Posted 06 Jan 2006 08:45:10
1
has voted
06 Jan 2006 08:45:10 Ron J posted:
Hello

I am trying to put multiple submit buttons on one form. the reason for this is that the user can then choose to go to Add Pricing, Add product category etc in my admin module. Each submit button will go to a different url & save the data they have updated.

I have seen a few Javascripts which do this but they don't work well with Dreamweaver & PHP

Any suggestions would be greatly appreciated.

Thanks

Replies

Replied 09 Jan 2006 16:26:12
09 Jan 2006 16:26:12 Roddy Dairion replied:
I think the simplest way, is to use this code

if ($_POST['button value']=="Button Name"
{
}
else if ($_POST['button value 2']=="Button Name2"
{
}
else ($_POST['button value 3']=="Button Name3"
{
}

hope it helps.
Roddy

Reply to this topic