Posted by Sjoerd on 05/22/06 20:18
Dave Mennenoh wrote:
> How can I differentiate between the two submits?
<input type="submit" name="foo" value="bar">
Clicking this button will post the form like there was a input field
with name foo and value bar. Look for $_POST['foo']. If it exists, the
button is clicked.
Another option is to use javascript to fill a hidden field. Something
like this:
<input type="hidden" name="TypeOfSubmit" id="TypeOfSubmit">
<input type="submit"
onClick="getElementById('TypeOfSubmit').value='1'">
<input type="submit"
onClick="getElementById('TypeOfSubmit').value='0'">
[Back to original message]
|