As per your originally/revised posted question/code:originally/revised posted question/code:
Since you are relying on name="solist" as per your submit button to call the function, you need to do something to the effect of:
if(isset($_POST['solist'])){ // call the solist function echo solist(); } The function won't fire up on its own, it needs to be called.
"or try to use
function solist(PDO $DBH)"
You don't need to do that. Just call the function; there is no need to pass a parameter, since you've already set it as global.
If you're not going to declare it as global, then just do function solist($DBH)