Question: I am trying to accomplish live checkbox result with checked/unchecked checkbox. My logic for checkbox works but now I want to store this live checkbox result in MYSQL. So when I click on checkbox, result should be stored in database same as when I uncheck checkbox result should be stored in database. I don't want to use any button in this example.

Here is my code:

```
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript" >
    function writeTo(object) {
      var container = document.getElementById("container");
      if (object.checked) {
         container.innerHTML =  "Added " + object.value + " <br />";
         } else {
        container.innerHTML =  "Removed " + object.value + " <br />";

      }
    }
</script>
</head>
<body>

    <div id="container"></div>
    <input type="checkbox" onclick="return writeTo(this)" name="check_list" value="Appel">Apple<br>
    <input type="checkbox" onclick="return writeTo(this)" name="check_list" value="Grape">Grape<br>
    <input type="checkbox" onclick="return writeTo(this)" name="check_list" value="Orange">Orange<br>
    <?php
   echo $dd= "<script>document.writeln(container.innerHTML);</script>";

require 'Database.php';

echo $sql="Update scott123.rahul_tbl_users set group1='$dd' where Dingoid=70001501";
//$sql1=mysql_query($sql);
     ?>

</body>
</html>

```

Answer: 
This works with a technique called difference matting. It never works well even if you have a solid clean plate. your best bet is to rotobrush or just mask them out manually. if you want to try difference matting you can set the footage layer with the people in it to difference blending mode and put a clean plate below it.
This method works well with a locked down camera. Depending upon how active people are and how still the background - you can remove the people by cutting and assemble pieces of the background to create a background layer without the people... Once you have a clean plate - then use a difference matte to subtract the background from your clip which will leave anything that moves (read people). This will work well if the hue/values between the background and the people are different. 

Doing this in conjuncture with animated masks gives good results and can give you a jump on your rotobrushing to improve your edges.

If all else fails the Mocha plug works well as long as you break your masks up into lots of parts to follow the planes of your actors.

I have never found doing this is a single tool solution.