Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > Classic ASP

Reply
 
LinkBack Thread Tools
Old April 30th, 2008, 12:37 PM   #1
New Member
 

Join Date: Apr 2008
Location: hull
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 natalief2008 is on a distinguished road
Exclamation Response.write if statements in a form?

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.

Code:
<%
    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. How would it be possible to display this information on the submit page after a box has been checked??

Please help,
kind regards Natalie

Last edited by saltedm8; May 5th, 2008 at 06:12 PM.. Reason: added [code] tags
natalief2008 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 5th, 2008, 05:58 PM   #2
New Member
 

Join Date: May 2008
Location: Ireland
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Miah is on a distinguished road
Re: Response.write if statements in a form?

Have a look at http://www.plus2net.com/asp-tutorial/form-checkbox.php I think it's what you might be looking for.
Miah is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant figure out senton and response Foobster .NET 0 August 15th, 2007 06:01 AM
Response.IsClientConnected does not work in IIS6 Jacque Classic ASP 2 May 22nd, 2006 06:48 PM
If Statements... courtjester Flash and ActionScript 5 September 1st, 2004 10:48 PM


Search Engine Optimization by vBSEO 3.2.0 RC8