Quote:

Thanx, but its not working :-( gives me "invalid method/function call: missing required parameter 1"




Apologies, I tidied up the function definition and I assumed that you would spot it.

Functions should be "black boxes". There are only two good reasons for using global variables in a function, and you are unlikely to come across them soon.

Therefore, to call the function, pass the parameters:
Code:
$sResult=Vensupp($model,$setag)