cakeday
09-26-2003, 12:02 PM
I want to pass parameter from one webpage to another using a hypelink. although the technology i am using is somewhat different, i hope you get the idea of what i am trying to do..
i_pagenum is the parameter, i am passing from PAGE1 to PAGE2. And then based on the parameter value is i_pagenum(which for this instance is going to be static), i want to select a value from the database.
i am using Oracle database, but the concept still stays the same.
My webpage1 looks like,
<!-- PL/SQL Language Definition Section -->
<%@ page language="PL/SQL" %>
<%@ plsql parameter="i_pagenum" default="1" %>
<HTML>
<HEAD></HEAD>
<BODY>
<form name="f1">
<table border="0" width="100%">
<TR>
<TD>1</TD>
<TD><a href="rtemps.test2?i_pagenum=1">Alphabetical listing by PCP
name</a></td>
</TR>
</table>
</form>
</BODY>
</HTML>
My webpage2, where the parameter i_pagenum is to be passed looks like,
<%@ page language="PL/SQL" %>
<HTML>
<HEAD></HEAD>
<BODY>
<%
DECLARE
v_descr psptest.descr%TYPE;
BEGIN
SELECT descr
INTO v_descr
FROM psptest
WHERE pagenum = i_pagenum;
%>
<TABLE BORDER="1">
<TR>
<TD align="right"><%= v_descr %></TD>
</TR>
<%END;%>
</BODY>
</HTML>
I want to pass the parameter i_pagenum from webpage1 to webpage2 and then select something from the database based on value is the parameter i_pagenum.
What am i doing wrong? I know, there has to be something simple..
anyhelp is very appreciated.
Thank you,
Kalpa
i_pagenum is the parameter, i am passing from PAGE1 to PAGE2. And then based on the parameter value is i_pagenum(which for this instance is going to be static), i want to select a value from the database.
i am using Oracle database, but the concept still stays the same.
My webpage1 looks like,
<!-- PL/SQL Language Definition Section -->
<%@ page language="PL/SQL" %>
<%@ plsql parameter="i_pagenum" default="1" %>
<HTML>
<HEAD></HEAD>
<BODY>
<form name="f1">
<table border="0" width="100%">
<TR>
<TD>1</TD>
<TD><a href="rtemps.test2?i_pagenum=1">Alphabetical listing by PCP
name</a></td>
</TR>
</table>
</form>
</BODY>
</HTML>
My webpage2, where the parameter i_pagenum is to be passed looks like,
<%@ page language="PL/SQL" %>
<HTML>
<HEAD></HEAD>
<BODY>
<%
DECLARE
v_descr psptest.descr%TYPE;
BEGIN
SELECT descr
INTO v_descr
FROM psptest
WHERE pagenum = i_pagenum;
%>
<TABLE BORDER="1">
<TR>
<TD align="right"><%= v_descr %></TD>
</TR>
<%END;%>
</BODY>
</HTML>
I want to pass the parameter i_pagenum from webpage1 to webpage2 and then select something from the database based on value is the parameter i_pagenum.
What am i doing wrong? I know, there has to be something simple..
anyhelp is very appreciated.
Thank you,
Kalpa