Here is the code for my form:
<form action = "index.php" method="post"> <!--the form is being submitted to the same page--> <button class="btn" name="button" onClick="submit()">Yes</button> <button class="btn btn-primary active" name="button" onClick="submit()">No</button> </form>
And on the top of my index.php I have the following:
<?php $refresh = $_POST['button']; ?>
When I echo $refresh after I push the button, all I get is 0. Any idea of what I'm doing wrong?
Thanks in advance!