very annoying problem

This is a discussion on "very annoying problem" within the Classic ASP section. This forum, and the thread "very annoying problem are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices




Closed Thread
 
LinkBack Thread Tools
  #1  
Old Sep 16th, 2003, 10:40
Rob's Avatar
Rob Rob is online now
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,192
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
Congrats u2... what took you so long though? heh heh
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
Old Sep 16th, 2003, 12:01
Junior Member
Join Date: Sep 2003
Location: Vatican City
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
<blockquote id="quote"><font size="1" face="geneva, verdana, arial" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by Rob

Congrats u2... what took you so long though? heh heh
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
I'm nearly there too. In fact, I'm one closer than I was before this post.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Sep 16th, 2003, 13:44
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
Actually, it isn't very big, and another thing, its not yellow, its more orangy brown, only Admins get yellow stars..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old Aug 11th, 2004, 19:30
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
very annoying problem

i have a login thing...

index.asp has the login form on it, which passes information to check.asp which redirects to index2.asp if correct and index.asp if incorrect - that all works fine. I also have a logout page - however if you logout, you can still type the address to index2.asp and get there.

index.asp
Code: Select all
<html>
<head>
<title>Index</title>
<script>
function openit(){
var which="lost/lost.htm"
whichit=window.open(which,"","width=400,height=125")
}
</script>
</head>
<body>

      <form method="POST" action="check.asp">
	    <table border="0" width="122">
		  <tr>
		    <td width="121">
 		     <font face="Comic Sans MS" size="2">User ID</font>

 		     <input type="text" name="uid" size="15">
		    </td>
 		 </tr>
		  <tr>
		    <td width="121">
	        <font size="2" face="Comic Sans MS">Password</font>

 		     <input type="password" name="pwd" size="15">
		    </td>
		  </tr>
		  <tr>
		    <td width="121">
		      <input type="submit" value="Login Now!" name="B1">

              <font face="Comic Sans MS" size="2">
		      
              </font>
		    </td>
		  </tr>
		</table>
      </form>

</body>
</html>
check.asp
Code: Select all
<%
'here is the connection string
Set conn = server.createobject("adodb.connection")
'this connection uses JET 4 it is the prefered method of connecting to an access database
DSNtemp = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("login.mdb")
'if you cant use JET then comment out the line above and uncomment the line below
'DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("/slog/login.mdb")
conn.Open DSNtemp

'here we are getting the info from the login form
If InStr(Request.Form("uid"),"'") Then
uid = Replace(Request.Form("uid"),"'"," ")
Else
uid = Request.Form("uid")
End If
If InStr(Request.Form("pwd"),"'") Then
pwd = Replace(Request.Form("pwd"),"'"," ")
Else
pwd = Request.Form("pwd")
End If

'now we will querry the database for a match
SQL = "Select * From users Where uid = '" & uid & "' And pwd = '" & pwd & "'"
Set RS = Conn.Execute(SQL)

'if the user is found we will set the session okeydokey to TRUE allowing the user to gain entrance
If Not RS.EOF Then
  Session("okeydokey") = True
	
	'always always always destroy recordsets and close connections!
	Set RS = Nothing
	Conn.Close

'since the user was found, we sent them toodling on to the next page	
'########################################################################################################
'##### IN THE LINE BELOW CHANGE INDEX2.ASP TO THE PAGE YOU WANT THE USERS TO BE DIRECTED TO
  Response.Redirect "index2.asp"
Else
   
   'ooops if we got this far they dont know their login info or arent in the database
	'AGAIN always always always destroy recordsets and close connections!
	Set RS = Nothing
	Conn.Close
  'so we send em back to try again	
  Response.Redirect "index.asp"
'#####  CHANGE INDEX.ASP IN THE LINE ABOVE TO THE NAME OF THE PAGE WHERE
'#####  WHERE YOU PLACED THE LOGIN TABLE. LEAVE IT IN QUOTES!!!!!!!!!!!!
'##################################################################################
  
End If
%>
index2.asp
Code: Select all
<%Response.Buffer=TRUE%>
<%IF session("okeydokey") = FALSE THEN Response.Redirect "index.asp"%>
<html>
<head>
<title>YOUR IN!</title>
</head>
<body>
<font face="Comic Sans MS" size="2">Congratulations, your in!</font>


<font face="Comic Sans MS" size="2">Now some will say you can use
Session.Abandon to kill an active session. Never trust that. you can see that as
long as the browser is open you can hit the back and forward buttons all day
long. But try closing the browser and coming back to this page without first
logging in!</font>

Logout</p>
</body>
</html>
logout.asp
Code: Select all
<%

session("okeydokey") = FALSE
response.redirect("index.asp")

%>
can anyone help? please?!!!! :sad:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old Aug 11th, 2004, 19:37
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
i've been looking at it, and i think it might be something to do with the page index2.asp being stored in the cashe, because if you refresh it, it does what it should do. Is there any code that i can put on the logout.asp code to delete the inde2.asp from the cashe?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
Old Aug 11th, 2004, 19:45
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
ok i've discovered its only a problem in IE - anyone know a way round this? (sorry to keep replying to my own posts :sad
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #7  
Old Aug 11th, 2004, 19:54
Rob's Avatar
Rob Rob is online now
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,192
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
Hi Ben....

put the following before any html on each page you dont want cached:-
Code: Select all
<%
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "cache-control", "no-store"
%>
There are several other headers that will do the same thing, but this should work.
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #8  
Old Aug 12th, 2004, 07:49
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
thanks rob i love you man :wink:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Tags
annoying, problem

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
Isn't it SOOOOO annoying when... VanessaJW Webforumz Cafe 27 May 22nd, 2007 00:18
Notepad Is annoying me Accurax Webforumz Cafe 21 Mar 12th, 2007 12:18
Simple but so annoying Sean J Web Page Design 11 Mar 11th, 2007 00:34
This ImageMap is annoying me! Dapandyman JavaScript Forum 2 Nov 14th, 2006 20:02
very annoying DATES benbacardi Classic ASP 15 May 26th, 2005 12:51


All times are GMT. The time now is 15:40.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42