The value of the button should change in 1 or 0, but the echo $_POST["ordina"] give always 1 and I don't understand because the code seems correct.
<script> function order() {
if (document.ordination.ordina.value == "1") {
document.ordination.ordina.value = "0";
} else {
document.ordination.ordina.value = "1";
} }</script>
<?php echo $_POST["ordina"]; ?>
<form id="ordination" name="ordination" method="POST" action="">
<button type="submit" value="1" class="button" name="ordina" onclick="order();return true;">Ordina</button>
The alert(document.ordination.ordina.value) give always 1.
Some can help me?
alert(document.ordination.ordina.value)first to see if you are accessing the right thing :)