mc_hammer
01-17-2007, 12:14 PM
Hi there,
I'm wondering how I can get more serious information from the submit-button which has been pressed.
Considering following html:
<form id="FormName" action="" method="post" name="FormName">
<button name="button" value="Button1" type="submit">Create a new entry</button>
<button name="button" value="Button2" type="submit">Delete selected entry</button>
</form>
with
echo $_POST['button'];
I would get 'Create a new entry' (if I press the first button) - but instead of the label I would rather get the information from value since I could work better with that and wouldn't need to do string-operations first... is this somehow possible?
Thx for any advice!
Oliver
I'm wondering how I can get more serious information from the submit-button which has been pressed.
Considering following html:
<form id="FormName" action="" method="post" name="FormName">
<button name="button" value="Button1" type="submit">Create a new entry</button>
<button name="button" value="Button2" type="submit">Delete selected entry</button>
</form>
with
echo $_POST['button'];
I would get 'Create a new entry' (if I press the first button) - but instead of the label I would rather get the information from value since I could work better with that and wouldn't need to do string-operations first... is this somehow possible?
Thx for any advice!
Oliver