Sie müssen Ihr Formular wie folgt ändern, da es mehrere Werte annimmt, die als Array gepostet werden sollten
<form action="register.php" method="POST">
<input type="checkbox" name="rating[]" value="5">5 Star
<input type="checkbox" name="rating[]" value="4">4 Star
<input type="checkbox" name="rating[]" value="3">3 Star
<input type="checkbox" name="rating[]" value="2">2 Star
<input type="checkbox" name="rating[]" value="1">Less than 2 Star
</form>
Dann in php
$where = '';
if(isset($_POST['rating'])){
$data = implode(',',$_POST['rating']); // beacuse your rating is only one column in db i think
$where = "WHERE cloumn_name IN($data)";
}
$query = "SELECT * FROM your_table $where";