My form consists of 2 clickable buttons:
echo '<input id='99999' type=\'submit\' name=\'send\' class=\'btn btn-default\' value=\'Some Action'/>';
echo '<input id='99988' type=\'submit\' name=\'send\' class=\'btn btn-default\' value=\'Another Action'/>';
Therefore the 2 buttons are loaded in my view, visible as Some Action
and Another Action.
Moving over to my controller:
echo ($_POST['send']);
prints out Some Action
and Another Action
when clicked on, accordingly.
Unfortunately, I want the id
field to get passed to the POST. (Want the controller to print 99999
and 99988
). How can I make this happen?
I also tried echo <button ... >
in the view but that did not pass the POST at all.