Possible Duplicate:
How can I tell which button was clicked in a PHP form submit?
I have a couple of submit buttons on my page, each one is going to insert the entered values into the sql db.
What I am hoping to do is capture which submit button was hit perform the related insert Statement then reload the page displaying the new values.. However I am just not sure how to do it.
I am used to specifying my post like so
<form action="orderform.php" method="post"
onsubmit="document.getElementById('myButton').disabled=true;
document.getElementById('myButton').value='Submitting...';"
>
The action is specifying a different .php doc.. I would like to some how make it so that when a submit button is selected it just goes to a function on the current page.. Is this possible? if so could you provide an example or link to an example as I just don't know what this would be called being new to PHP.