May a redirect to the external page do as well?
In that case, just use the header command.
header("Location: logout.php?userid=$userID");
(By the way; if you are using single quotes, the variables might not be parsed correctly by php..., referring to the include('logout.php?userid=$userid') which will result in just whatยดs typed inside the quotes.)
Hope this wasnยดt too confusing...