Filter database by checkbox

2

This displays all data ...

public function getProdutosHome($limit = false){
    if($limit == false){
        $query = "SELECT * FROM 'fretes' ORDER BY id_frete DESC";   
    }else{
        $query = "SELECT * FROM 'fretes' ORDER BY id_frete DESC LIMIT $limit";
    }
    return self::conn()->query($query);
}

How can I filter using checkbox ? with each click going filtering the data of the database?

Thank you and sorry for the question.

    
asked by anonymous 12.11.2017 / 00:31

0 answers