I can't get my head around why this code doesn't keep toggling. What should be changed?
print_r( $_POST );
$direction = isset( $_POST['direction'] ) ? $_POST['direction'] : 'DESC';
$opposite = $direction == 'DESC' ? 'ASC' : 'DESC';
echo '
<form method="POST" >
<input type="submit" value="' . $opposite . ' " name="direction">
</form>
';