Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 9th, 2004, 11:36 AM
padawanjoey padawanjoey is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 6 padawanjoey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
sessions.content.removeall HELP!!!

I am in cram time now, and I need someone to help me with this. I have a form which allows users to select an event, and then submit their name into a tbl that pools the events with the user ID. I had it so that once the event was entered, they could go back but the drop down would not show what they had already selected. Now, it is not doing this. I tried the "sessions.content.removeall" but not sure where to place it. Does anyone see anything wrong with this code?? Any help please....


<%
If session("tmaaid") = "" Then
response.redirect "drawing_login.asp"
End If
%>
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Even Selection</title>
</head>

<body topmargin="0" leftmargin="0">

<!--webbot bot="Include" U-Include="top.htm" TAG="BODY" --><%If request("eventid") = "" Then%>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table1">
<form method="POST" action="--WEBBOT-SELF--">
<tr>
<td>&nbsp;</td>
<td><font size="2" face="Verdana">Select an event that will enter your
name into a random drawing:</font><font face="Verdana"><select size="1" name="EventID">
<%
Set cn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open Server.MapPath("fpdb/example.mdb")
sq = "SELECT * FROM qryAvailable WHERE ID <> '" & session("tmaaid") & "' OR ID Is Null ORDER BY Event_Date"
rs.Open sq,cn,adOpenKeyset
While Not rs.EOF
%>
<option value="<%=rs("Event_ID")%>"><%=rs("Event_Name")%></option>
<%
rs.MoveNext
Wend
rs.close
cn.close
set rs=nothing
set cn=nothing
sessions.content.removeall
%>
</select><input type="submit" value="Go"></font></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</form>
</table>
<%Else
Set cn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open Server.MapPath("fpdb/example.mdb")
sq = "SELECT * FROM tblpool"
rs.Open sq,cn,2,3

rs.addnew

rs("event_id") = request("eventid")
rs("id") = session("tmaaid")

rs.update
rs.movenext
rs.close
cn.close
set rs=nothing
set cn=nothing
%>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<p align="left">Thank you for entering the random drawing for this event.
Once the random names are drawn, you will be notified ONLY if you have been
selected.<br>
Click here to return to the <a href="default.asp">Home Page</a>.</td>
</tr>
</table>
<%

End If
%>
</body>

</html>

Reply With Quote
  #2  
Old October 9th, 2004, 01:39 PM
padawanjoey padawanjoey is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 6 padawanjoey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I found it! Never mind all.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > sessions.content.removeall HELP!!!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway