Description: Create the procedure process_visitor_name, the action of the form in visitor_name. Set a cookie called VISITOR that stores the visitor name passed in. To set the cookie, utilize the set_cookie procedure from this chapter. Then paint a page with a hyperlink to the main_frame procedure.
CREATE OR REPLACE PROCEDURE PROCESS_VISITOR_NAME (p_visitor_name IN VARCHAR2) IS -------------------------------------------------------- -- FILENAME: process_visitor_name -- FILEDATE: 01.20.2003 -- CREATED BY: Susan Boardman -- DESCRIPTION: Sets cookie for visitor name and -- paints link to enter application -- URL : process_visitor_name -------------------------------------------------------- BEGIN set_cookie('VISITOR', p_visitor_name, sysdate+5); htp.p('<HTML> <HEAD><TITLE>Thank You</TITLE></HEAD> <BODY> Click <A HREF="main_frame">here</A> to enter the application. </BODY> </HTML>'); EXCEPTION WHEN OTHERS THEN htp.p('An error occurred in PROCESS_VISITOR_NAME: ' ||SQLERRM); END;