Ok i have finally worked out the issue about running php functions in smarty. But now how can i call that function with a smarty variable as a parameter? Here's the code.
You can call any PHP function directly in the template. To display the result in your case it would be
{getcommission($inputid)}
The function parameter ($inputid) must be an assign ...