Is it possible to submit hidden name value pair based on which button is clicked?
Here's my form:
<form action="POST" action="">
<button>
<input type="hidden" name="vote" value="up"/>
vote up!
</button>
<button>
<input type="hidden" name="vote" value="down"/>
vote down
</button>
</form>
For some reason, the name value pair I received was always the latter (the first one got replaced). For example a user clicked on 'vote down', I still get $input['vote']
= up
Does anyone know how to fix this?