$sql = "select * from product ,type_product where product.id_type = type_product.id_type";
if ($typesearch=="name_pro")
$sql=$sql . " and (product.name_pro LIKE '%$search%') limit $goto,$list_page";
else if
($typesearch=="name_type")
$sql=$sql ." and (type_product.name_type LIKE '%$search%') limit $goto,$list_page ";