function myfilter(){
$args = array(
'post_type' => 'post',
'meta_query' => array(
array(
'key' => 'brend',
'value' => 'LG',
'compare' => 'AND'
),
)
);
$myquery = new WP_Query($args);
}
<?php if($_POST):?>
<?php myfilter(); ?>
<?php endif; ?>