i am using ajax with php and making a simple form which submit itself on checkbox status change. I have to unset the variable within my isset... I just want this varible 1 time but program is taking it again and again this is my code

```
<html>
<head>
<title>
</title>
<script src="jquery-1.5.1.js"></script> 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js">
</script>
</script>

<!--Script to submit form by checkbox click-->

<script type="text/javascript">
    $(function(){
        $('.checkbox').on('change',function(){
        $('#form').submit();
        });
    });
</script>
</head>
<body>
<?php
$abc=2;
?>
<form id="form" method="post" action="">
<input type="checkbox" name="checkbox" value="checked" <?php if(isset($_POST['checkbox']) || isset($abc)){
    echo "checked";
 }
  else{
     echo "";
 }

//echo (isset($abc)?"checked":"");?> class="checkbox"/>
</form> 
<?php 

 ?>
<?php 
if (isset($_POST['checkbox'])=='checked' || isset($abc)){

    echo "data is posted";
    unset($GLOBALS["$abc"]);
    //$abc=null;

}
else{
        echo "not posted";
        unset($GLOBALS["$abc"]);
        //$abc=null;
    }
 ?>
</body>
</html>

```

i have variable $abc i want its value just 1 time but i am unable to unset it.