Pass value from dropdown list to another ASP SQL
Hi,
I am New to ASP. Need your help please.
I am working with Oracle Database and ASP.
I am having problem to pass value from dropdown list to another ASP to SQL statement. Below are codes:
First Page code:
<html>
<head>
<title>test</title>
</head>
<body>
<form name="test" action="patients.asp" method="POST">
Select Ward:
<select name="wardlist">
<option value="Arnwood">Arnwood</option>
<option value="Beacon">Beacon</option>
</select>
<input type="submit" value="Submit">
<input type="Reset" name="Reset">
</form>
</body>
</html
Main Page:
<%
Dim paraval
paraval = Request.Form("wardlist")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "PIMSP_MHLD","REPORT","REPORT"
Set Session("PIMSP_MHLD_conn") = conn
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn,3,3
sql="SELECT spont.shortname..... WHERE spont.shortname = & paraval &"
%>
....
....
Thanks in Advance
Thamil
|