I am retiriveing some names from on database by some conditions....t hat names are being displayed in the listbox........ ..my question is if i select a name that person details should be displayed in the same form..........t hat person's name and other details are stored in same table..........
Plz help with code.........
My code is as follows........ .
Plz help with code.........
My code is as follows........ .
Code:
<%@ Language = VBScript%>
<% Response.Buffer = True
%>
<html>
<head>
<title>PERSONAL DETAILS</title>
</head>
<body>
<%
Dim da
da = date()
Dim rs
Set rs = Server.CreateObject ("ADODB.Recordset")
rs.Open "details", "DSN=Personal"
Dim yy
Dim mm
dim age, caste, rscaste, ageto, gender
age = Request.Form ("D1") '( Taken from another form in another asp file)
caste = Request.Form ("D2")
ageto = Request.Form ("D3")
gender = Request.Form ("R1")
a = cint (age)
b = cint (ageto) %>
<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" u-file="fpweb:///_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" --><p>
Name : <select size="1" name="D1" size = "20">
<% While Not rs.EOF
' FINDING AGE
mm = DateDiff("m", rs("DOB"), da)
if mm >= 12 then
yy = cint(mm/12)
end if
' Selecting records by age
for i = age to ageto
rscaste = rs("Caste")
if yy = i then
' Selecting records by caste
if caste = rscaste then
' Selecting records by Gender
if not rs("Gender") = gender then
%>
<option value = "<%=rs("Name")%>"><%=rs("Name")%></option>
<%
end if
end if
end if
next
rs.MoveNext
Wend %></select></form>
<%
rs.Close
Set rs = Nothing
%>
</body>
</html>
Comment