Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: getting cookies with owa.cookie cartridge
In article <35B50DB3.F932B791_at_purdue.edu>,
eschlene_at_purdue.edu wrote:
> I'm trying to retrieve the value of a cookie from the browser during a
> PL/SQL stored procedure. I've read the documentation and still can't
> make it work. Anyone have a working example of how this is done?
>
Eric
Here are to procedure that read and write cookies
--WRITE
COOKIE-----------------------------------------------------------------PROCEDURE SET_COMPANY_COOKIE (compcode in varchar2,acronym in varchar2)is
BEGIN
owa_util.mime_header('text/html', FALSE); owa_cookie.send('compcode',compcode); owa_cookie.send('acronym',acronym); owa_util.http_header_close;
END;
--READ COOKIE----------------------------------------------------------CREATE OR REPLACE PROCEDURE GET_COMPANY_COOKIE is
ccompany owa_cookie.cookie;
cacronym owa_cookie.cookie;
BEGIN ccompany := owa_cookie.get('compcode'); cacronym := owa_cookie.get('acronym');
IF (ccompany.num_vals > 0) THEN
htp.p('<center>');
htp.p('<table border=0 cellspacing=0 cellpadding=0 width=600>');
htp.p('<TR>'); htp.p('<TD align=left valign=top>'); htp.fontOpen( ccolor => '#ff0000', cface => 'Arial', csize => '0'); htp.Strong('Company: '); htp.p(htf.strong(lower(Initcap((cacronym.vals(1)))))); htp.fontclose(); htp.p('</TD>'); htp.p('</TR>'); htp.tableclose;
...etc...etc
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Wed Jul 22 1998 - 01:09:06 CDT
![]() |
![]() |