使用复选框jquery mysql php过滤内容

how can filter content with checkbox using php jquery... when i post the form via jquery i get warning undefined index

Here is my js file

function filterContent(){
var all = $(".all").val();
$('input.all').change(function(){


   $.post("filterall.php", {name: all}, function(data){
       alert(data);

   });
  });

  }

HTML CODE

 <table class="table">
 <tr>
 <td><label class="margin pull-left">All</label><input type="checkbox"  value ="all" name="all" class="all"></td>
 <td><label class="margin pull-left">jquery</label><input type="checkbox" name="jquery"></td>

  <td>
  <label class="margin pull-left">HTML</label>
  <input type="checkbox" name="html"></td>
  <td> 
  <td><label class="margin pull-left">Javascript</label>
  <input type="checkbox" name="javascript"></td></td>
  <td><label class="margin pull-left">Php</label><input type="checkbox" name="html"></td>
   <td><label class="margin pull-left">Java</label><input type="checkbox" name="java"></td>


    </tr>
 </table>

PHP CODE

<?php


include 'connection.php';
if(isset($_GET['all'])){
$all = $_POST['all'];
echo "hello".$all;
}

?>

use if(isset($_POST['all'])){ in your php as you are sending POST request