Two searchforms with different categories/posts per page

I heard query_posts() is bad so I shouldn’t be using that, but how
else could I achieve this?

Yes, query_posts is bad. You heard right. You are most of the way to doing this already. You have all the parts. You just need to mix them a little.

function searchfilter($query) {
    if ($query->is_search()) {
        $query->set('posts_per_page', 5);
        if(isset($_GET['search-type'])) {
             $type = $_GET['search-type'];
             if($type == 'news') {
                 $query->set('category_name','news'); // needs to be the slug not the name
             }
        }
    }
    return $query;
}
add_filter('pre_get_posts', 'searchfilter');

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)