Hi guys,
I am using a number of checkboxes and I want to get their value using POST method, but my problem is that I use two buttons at the end! Buttons "Accept" and "Reject"
If accept is pressed I want to know it so I can make different process on them, if reject is pressed again I want to know it.
Here is what I use up to know but I haven't manage to get it work if reject is pressed instead of accept
<?php
$value = $_POST['chk'];
//if accept is pressed
//do this...
//else if reject is pressed
//do this...
?>
<form action='test.php' method='post'>
<input type='checkbox' name='chk[]' value='value1'>VALUE 1<br>
<input type='checkbox' name='chk[]' value='value2'>VALUE 1<br>
<input type='checkbox' name='chk[]' value='value3'>VALUE 1<br>
<input type='checkbox' name='chk[]' value='value4'>VALUE 1<br>
<input type='submit' name='submit' value='Accept'>
<input type='submit' name='submit' value='Reject'>
</form>