It was hard a little bit to understand the example above. Since it did not work properly :(
I managed to get a similar one running, the whole example is as following:
<?php
$connection = ora_logon("user@DBname", "password");
$cursor = ora_open($connection);
ora_commitoff($connection);
$cursor=ora_parse($cursor, "begin user.user_create (:name,:surname,:street,:country,:postal,:city,:tel,:mail,:number); end;");
$name = 'a';
$surname = 'a';
$street = 'a';
$country = 'a';
$postal = 'a';
$city = 'a';
$tel = 'a';
$mail = 'a';
ora_bind($cursor, "name", ":name", 32, 1);
ora_bind($cursor, "surname", ":surname", 32, 1);
ora_bind($cursor, "street", ":street", 32, 1);
ora_bind($cursor, "country", ":country", 32, 1);
ora_bind($cursor, "postal", ":postal", 32, 1);
ora_bind($cursor, "city", ":city", 32, 1);
ora_bind($cursor, "tel", ":tel", 32, 1);
ora_bind($cursor, "mail", ":mail", 32, 1);
ora_bind($cursor, "number", ":number", 32, 2);
// The following step is to charge the output variable with an intial value (Actually still doesn't know why? but it works like this ;-)) )
$okdnr = "a";
ora_exec($cursor);
print "okdnr is $okdnr";
?>
The called stored procedure is as following:
CREATE OR REPLACE procedure customer_create
(
iname in varchar2,
insurname in varchar2,
instreet in varchar2,
incountry varchar2,
inpostal in varchar2,
incity in varchar2,
intel in varchar2,
inemail in varchar2,
okdnr out varchar2)
is
begin
.....
..... SOME CODE ....
.....
okdnr:='something_to_output';
commit;
end customer_create;
/
The most important part of all this is the ora_bind function. Becarefull while writing the syntax regarding the definition wether the variable is an INPUT (1) variable or an OUTPUT variable (2).
Hope this help someone!!