EDIT ~ I have answered my own question below in the EDIT section, not answering because i feel wrong if i get points for answering my own post =/
I am trying to find a way to pass parameters to this procedure via a URL
create or replace procedure extinput(KEY in varchar2 := 'KEY',NAME in varchar2 := 'NAME') is
l_apex_url varchar2(4000);
begin
htp.p('Hello extinput');
htp.p(KEY);
--htp.p('NAME');
htp.p(NAME);
--l_apex_url:= 'http://myhost:myport/pls/apex/extinput;
--l_apex_url:= 'google.com';
--owa_util.redirect_url(l_apex_url);
end extinput;
If i plug the URL:
http://horizon.lcc.edu:7777/pls/apex/extinput
into my browser then the page dispays:
Hello extinput KEY NAME
Which is fine for confirming that i can call the procedure via a url, but now im working on passing some variables to its parameters.
I want to know if I will have to put the values in the URL [GET] (really would rather not) or if there is a way to reteive the [POST] data from a form on an external server like so:
<form Method="POST" action="http://horizon.lcc.edu:7777/pls/apex/extinput" name="form1">
<P><b>This form has three parameters, which matches the number of parameters the procedure view_http_post_fixed has.</b>
<table><tr><td>Session Id:</td>
<td><input type="text" name="SESSION_ID" value="9582274473829998340"> </td>
</tr>
<tr><td>Key:</td>
<td><input type="text" name="KEY" id="KEY" value="1109"></td>
</tr>
<tr><td>Name:</td>
<td> <input type="text" name="NAME" id="NAME" value="Jeff Eberhard"></td>
</tr></table>
<input value="Submit" type="submit">
</form>
Any help or "point's in the right direction" will be GREATLY appreciated =)
$$ EDIT $$
Ok so i have successfully gotten passed post data in my pl sql procedure
create or replace procedure extinput(KEY in varchar2 := 'KEY',NAME in varchar2 := 'NAME')
is
l_apex_url varchar2(4000);
begin
htp.p('Hello extinput');
htp.p(KEY);
htp.p(NAME);
insert into post_table (col2, col3 ) values(KEY, NAME);
end extinput;
Coming to this conclusion makes me feel like i made this question more complicated then it needed to be. Sorry if that is so, but atleast this problem is now solved.
Errors were being thrown because i was sending 3 parameters but only coded two into the procedure. So either remove an input from the form, or add a third parameter area. here is the finalized form:
<form Method="POST" action="http://horizon.lcc.edu:7777/pls/apex/extinput" name="form1">
<P><b>This form has three parameters, which matches the number of parameters the procedure view_http_post_fixed has.</b>
<table>
<tr><td>Key:</td>
<td><input type="text" name="KEY" id="KEY" value="1109"></td>
</tr>
<tr><td>Name:</td>
<td> <input type="text" name="NAME" id="NAME" value="Jeff Eberhard"></td>
</tr></table>
<input value="Submit" type="submit">
</form>