I am trying to use javascript's confirm function to set my php variable $continue based on the confirm click. I feel like the code below should work, but $continue is always false.
<script type="text/javascript">
<!--
var answer;
answer = confirm("Do you want to continue?");
if (answer) { <?php $continue = true; ?> }
else { <?php $continue = false; ?> };
// -->
</script>
Any help is always appreciated!