tmd200
asked on
creating a variable from a request.Querystring
The below is some code I have created- it swaps Grade to Math_bonus and displays the correct Math_bonus value for the entered Grade. I now want to expand on this and take points_awarded the outcome of the above, and check is it greater then values in multiple fields of multiple tables. I like to make points_awarded a variable for easy access, without messing up the code
<form action="test2.asp" method="get"><%
Set Con = Server.CreateObject("ADODB .Connectio n")
Con.Open "db2"
Set objRS = Server.CreateObject("ADODB .Recordset ")
SQL = "Select Grade, Math_bonus From point_grade"
Set objRS = Con.Execute(SQL)
If Not objRS.EOF Then
objRS.MoveFirst
%>
<p>
<select name="Points_awarded" onchange="form.submit()">
<option></option>
<%
Do While Not objRS.EOF
%>
<option value="<%=objRS.Fields("Ma th_bonus") %>"><%=obj RS.Fields( "Grade") %></option>
<%
objRS.MoveNext
Loop
%>
</select>
<%= request.Querystring("Point s_awarded" )%> </p>
<p> </p>
</form>
<%
End If
%>
<form action="test2.asp" method="get"><%
Set Con = Server.CreateObject("ADODB
Con.Open "db2"
Set objRS = Server.CreateObject("ADODB
SQL = "Select Grade, Math_bonus From point_grade"
Set objRS = Con.Execute(SQL)
If Not objRS.EOF Then
objRS.MoveFirst
%>
<p>
<select name="Points_awarded" onchange="form.submit()">
<option></option>
<%
Do While Not objRS.EOF
%>
<option value="<%=objRS.Fields("Ma
<%
objRS.MoveNext
Loop
%>
</select>
<%= request.Querystring("Point
<p> </p>
</form>
<%
End If
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.