Link to home
Start Free TrialLog in
Avatar of tmd200
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.Connection")
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("Math_bonus")%>"><%=objRS.Fields("Grade") %></option>
                        <%
          objRS.MoveNext
          Loop
          %>
                      </select>
                      <%= request.Querystring("Points_awarded")%> </p>
                    <p>&nbsp; </p>
                  </form>
               
<%
          End If    
          %>
ASKER CERTIFIED SOLUTION
Avatar of memerot
memerot

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial