Hello everyone,
i have a stored procedure with an output paramaters the problem is that i can't get the right output value, when i run the stored procedure in query analyser it runs correctly,
Does any one know why? i spent 2 days in this i'm getting crasy
this is the code:

$stmt=mssql_init("sp_name", lnk);
mssql_bind($stmt, "@param1", $param, SQLVARCHAR, FALSE,false,500);
mssql_bind($stmt, "@Id", $nid, SQLVARCHAR, FALSE, false,500);
mssql_bind($stmt, "@sucess", &$sucess, SQLINT4, true, true, 4);
$rs= mssql_execute($stmt);

my sprocedure is:
CREATE PROCEDURE sp_name
@param1 as nvarchar(500),
@Id as nvarchar(500),
@sucess int output
AS
....
select @sucess=0
return 2


any help plzzzzzzzzz,