Is there a way to control both Order By and Order query parameters from one input field

If you only need to use URL query parameters, you should use simple links instead of form.

If you want to use form, but still want to use URL query parameters, you should definitely go with javascript.

But, if you really want to use form and $_POST data, you can use this:

$orderby = isset($_POST['orderby']) ? $_POST['orderby'] : null; 

switch ($orderby) {
    case 'a_to_z':
        $field = 'post_title';
        $sort="ASC";
    break;
    case 'z_to_a':
        $field = 'post_title';
         $sort="ASC";
    break;
    case 'date_oldest':
        $field = 'post_date';
         $sort="ASC";
    break;        
    default:
         $field = 'post_date';
        $sort="DESC";
    break;
}

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