<form action="here.php" method="POST">
<input type="text" name="text">
<div id="one">
<input type="hidden" name="aaa" value="one">
<input type="submit" value="Send">
</div>
<div id="two">
<input type="hidden" name="aaa" value="two">
<input type="submit" value="Send">
</div>
</form>
Clicking on Send
of div one
or div two
, the POST data has $_POST['aaa'] = 'two'
Is it possible to make one form with two submit buttons that POST different values?
If I click on div one
submit, I would like to receive $_POST['aaa'] = 'one'
and if i click on div two
submit I would like to receive $_POST['aaa'] = 'two'
.
I'm using PHP and jQuery.
I don't want two forms. I don't want multiple <input type="text" name="text">