natalie_2008
New member
- Local time
- Today, 17:33
- Joined
- Apr 30, 2008
- Messages
- 1
Hope this is the correct thread to post in.
I am a student and currently studying sql, vbscript and web based databases etc.
However i am pretty much stuck on the following piece of script.
<%
Set MyConn=Server.CreateObject("ADODB.Connection")
MyConn.Open "pqrtrav"
Set Rs=MyConn.Execute("SELECT*From[trip]Order by activity")
Previousactivity="None"
WHILE NOT Rs.EOF
CurrentActivity=Rs("Activity")
if (CurrentActivity<>PreviousActivity) then
%>
<%Response.Write(Rs("Activity")) %> <input name="<%Response.Write(Rs("Activity")) %>" type="checkbox" value="<% Response.Write(Rs("Activity")) %>" >
<%
end if
PreviousActivity=CurrentActivity
Rs.MoveNext
WEND
Rs.Close
MyConn.Close
%>
I have opened the database and produced a list of 'activities' taken from the database with a checkbox along side it. However, when I submit the form, the information is not displayed on the next page when boxes are checked. On the submit page, i have the following code, <% Response.write (Request.Form("")) %> but do not know what to put in between the speech marks as i cannot specify the value if it taken from a list.
How would it be possible to display this information on the submit page after a box has been checked??
Please help,
kind regards Natalie
I am a student and currently studying sql, vbscript and web based databases etc.
However i am pretty much stuck on the following piece of script.
<%
Set MyConn=Server.CreateObject("ADODB.Connection")
MyConn.Open "pqrtrav"
Set Rs=MyConn.Execute("SELECT*From[trip]Order by activity")
Previousactivity="None"
WHILE NOT Rs.EOF
CurrentActivity=Rs("Activity")
if (CurrentActivity<>PreviousActivity) then
%>
<%Response.Write(Rs("Activity")) %> <input name="<%Response.Write(Rs("Activity")) %>" type="checkbox" value="<% Response.Write(Rs("Activity")) %>" >
<%
end if
PreviousActivity=CurrentActivity
Rs.MoveNext
WEND
Rs.Close
MyConn.Close
%>
I have opened the database and produced a list of 'activities' taken from the database with a checkbox along side it. However, when I submit the form, the information is not displayed on the next page when boxes are checked. On the submit page, i have the following code, <% Response.write (Request.Form("")) %> but do not know what to put in between the speech marks as i cannot specify the value if it taken from a list.
How would it be possible to display this information on the submit page after a box has been checked??
Please help,
kind regards Natalie