Print Page | Close Window

Lock the other pages to non members!

Printed From: S2H.co.uk
Category: Web Wiz Forums
Forum Name: Tips & Tricks Support
Forum Description: Support for tutorials from S2H on Web Wiz Forums
URL: http://www.s2h.co.uk/forum/forum_posts.asp?TID=20
Printed Date: 27 Mar 2026 at 2:04am


Topic: Lock the other pages to non members!
Posted By: Guests
Subject: Lock the other pages to non members!
Date Posted: 24 Jan 2007 at 2:28pm
Hello scotty.
 
Firstly Great site
 
Ok i have tried to get the "lock out no members to other pages" mod thing, and i cant get it to work..  I entered it exactly like you said:
 
Quote <%
<!--#include virtual="/forum/common.asp" -->

<%
If lngLoggedInUserID = 2 then
   Call closeDatabase()
   response.redirect("/forum/login_user.asp")
End If

%>
 
i have tried it with and without the "close database" and the "redirect" 
Im currently learning ASP so i might be a bit slow and have missed something, I added it to my index.asp and had to take it off because it said there was an error on line 6 "<%" is on line 6!!
 
Cheers mate!
 
Bazza



Replies:
Posted By: Matt
Date Posted: 25 Jan 2007 at 1:47pm
am very sorry, i did a mistake, you need to remove the first <% from it, as that isnt ment to be there.

so it looks like this:

<!--#include virtual="/forum/common.asp" -->

<%
If lngLoggedInUserID = 2 then
   Call closeDatabase()
   response.redirect("/forum/login_user.asp")
End If

%>



Posted By: Guests
Date Posted: 26 Jan 2007 at 4:13pm
Thanks scotty!!
 
I should have known it was something simple!!
 
 
Bazza!



Print Page | Close Window