meltingpot
Technical User
I have the following code to update a database field.
Head .........................................................
<% If Request.QueryString("update") <> "" Then %>
<%
strConnectionString = "dsn=jsastc"
Set cnn = Server.CreateObject("ADODB.Connection")
cnn.Open strConnectionString
strSQL = "UPDATE Applications SET Applications.StatusCode = '"&(Request.QueryString("update"))&"' WHERE
ApplicationID = "&(Request.QueryString("ApplicationID"))&""
cnn.Execute strSQL,,adCmdText + adExecuteNoRecords
cnn.Close
%>
<% Else %>
<% End If %>
Body ..........................................................
<A href="course_allocate.asp?ApplicationID=<%=(course_pending.Fields.Item("ApplicationID").Value)%>&CourseID=<%=
(found_course.Fields.Item("CourseID").Value) %>&update=Accepted"><img src="../images/accpet2.gif" width="40"
height="20" border="0"></A>
-----------------------------------
please notice that it simply changes the original value to 'Accepted' >&update=Accepted.
I would like to replace this with a varibal value from a dropdown box .
The code for the box is
Drop Down ...............................
<select name="coursechange" class="bodytext" id="coursechange">
<%
While (NOT getstatus.EOF)
%>
<option value="<%=(getstatus.Fields.Item("Status").Value)%>"><%=(getstatus.Fields.Item("Status").Value)%></option>
<%
getstatus.MoveNext()
Wend
If (getstatus.CursorType > 0) Then
getstatus.MoveFirst
Else
getstatus.Requery
End If
%>
</select>
-----------------------------------
Can anybody help
Cheers
Head .........................................................
<% If Request.QueryString("update") <> "" Then %>
<%
strConnectionString = "dsn=jsastc"
Set cnn = Server.CreateObject("ADODB.Connection")
cnn.Open strConnectionString
strSQL = "UPDATE Applications SET Applications.StatusCode = '"&(Request.QueryString("update"))&"' WHERE
ApplicationID = "&(Request.QueryString("ApplicationID"))&""
cnn.Execute strSQL,,adCmdText + adExecuteNoRecords
cnn.Close
%>
<% Else %>
<% End If %>
Body ..........................................................
<A href="course_allocate.asp?ApplicationID=<%=(course_pending.Fields.Item("ApplicationID").Value)%>&CourseID=<%=
(found_course.Fields.Item("CourseID").Value) %>&update=Accepted"><img src="../images/accpet2.gif" width="40"
height="20" border="0"></A>
-----------------------------------
please notice that it simply changes the original value to 'Accepted' >&update=Accepted.
I would like to replace this with a varibal value from a dropdown box .
The code for the box is
Drop Down ...............................
<select name="coursechange" class="bodytext" id="coursechange">
<%
While (NOT getstatus.EOF)
%>
<option value="<%=(getstatus.Fields.Item("Status").Value)%>"><%=(getstatus.Fields.Item("Status").Value)%></option>
<%
getstatus.MoveNext()
Wend
If (getstatus.CursorType > 0) Then
getstatus.MoveFirst
Else
getstatus.Requery
End If
%>
</select>
-----------------------------------
Can anybody help
Cheers