Add the route to the routes.php config file
$route['welcome/test/(:num)'] = "{your_controller}/{your_function}/$1";
And this will allow you to have the link just as
welcome/test/$user_id
and it will call your function with $user_id as the argument. Make sure to specify the parameter in the function signature.
Note: don't put '$' in the URL, replace $user_id with the actual id number. I really recommend reading the CI documentation on routing, you really need to have a good understanding of it to use CI properly. http://ellislab.com/codeigniter/user-guide/general/routing.html