create or replace procedure sampleForm as
begin
   htp.htmlOpen;
   htp.headOpen;
   htp.title('Sample Form with Unknown Number of Parameters');
   htp.header(1, 'Unknown Number of Parameters');
   htp.headClose;
   htp.bodyOpen;
   htp.formOpen(owa_util.get_owa_service_path ||
                '!processQuery');

   htp.print(htf.strong('USER ID: '));
   htp.formText('usid', 20, 50);
   htp.nl;

   htp.formSelectOpen('month',
            'Choose the course component: ');
   htp.formSelectOption('January');
   htp.formSelectOption('February');
   htp.formSelectOption('March');
   htp.formSelectClose;
   htp.nl;

   htp.formCheckbox('day','Monday');
   htp.formCheckbox('day','Tuesday');
   htp.formCheckbox('day','Wednesday');
   htp.formCheckbox('day','Thursday');
   htp.nl;

   htp.print(htf.strong('PASSWORD: '));
   htp.formPassword('passwd', 20, 50);
   htp.nl;

   htp.formSubmit(NULL, ' Proceed ');
   htp.formReset;
   htp.formClose;
   htp.bodyClose;
   htp.htmlClose;
Exception
   when others then
      htp.print('error in user_access.get_access');
end sampleForm;
/
show errors
CREATE or REPLACE PROCEDURE processQuery (
    num_entries  IN NUMBER,
    name_array   IN OWA.vc_arr,
    value_array  IN OWA.vc_arr,
    reserved     IN OWA.vc_arr)
IS
BEGIN
    htp.htmlopen;
    htp.headopen;
    htp.title('Unmatched query string example');
    htp.headclose;

    htp.bodyopen;
    htp.header(1, 'Unmatched query string example');

    htp.print('Query string has ' || num_entries || 

                        ' name-value pairs.'); 

    htp.dlistOpen;
    FOR counter IN 1 .. num_entries
    LOOP
        htp.dlistTerm(name_array(counter));
        htp.dlistDef(value_array(counter));
    END LOOP;
    htp.dlistClose;
    htp.bodyclose;
    htp.htmlclose;
END;
/
show errors
