I want to update a PHP variable $LinkOpen based on the current state of a checkbox element .avflipswitch.
$LinkOpen
.avflipswitch
Based on the .avflipswitch<
.avflipswitch<
What you are trying is not possible in php, but very easy with jquery:
$('.avflipswitch').on("change", function (e){ if(this.checked){ $('a').attr("target","_self") } else{ $('a').attr("target","_blank") } });