Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - password protecting other pages using...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

password protecting other pages using...

 Post Reply Post Reply Page  <12
Author
crackerjacks View Drop Down
Newbie
Newbie


Joined: 06 January 2008
Status: Offline
Points: 32
Post Options Post Options   Thanks (0) Thanks(0)   Quote crackerjacks Quote  Post ReplyReply Direct Link To This Post Posted: 25 January 2009 at 11:17pm
Originally posted by crackerjacks crackerjacks wrote:

Originally posted by Scotty32 Scotty32 wrote:

I've got a tutorial on how to make Member-Only Pages.
 
I have tried this with no success as well.
 
Making some headway, but now instead of proceeding to the page that I was trying to go to, it takes me to login page but does not go back to the orginal page I wanted to go to after I log in. Any sugestions?
Back to Top
crackerjacks View Drop Down
Newbie
Newbie


Joined: 06 January 2008
Status: Offline
Points: 32
Post Options Post Options   Thanks (0) Thanks(0)   Quote crackerjacks Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2009 at 11:32pm
Any sugestions on this? Anyone?
Back to Top
jarv View Drop Down
Groupie
Groupie


Joined: 15 December 2008
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote jarv Quote  Post ReplyReply Direct Link To This Post Posted: 11 February 2009 at 11:15am
Please can someone help us?
Back to Top
jarv View Drop Down
Groupie
Groupie


Joined: 15 December 2008
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote jarv Quote  Post ReplyReply Direct Link To This Post Posted: 11 February 2009 at 11:24am
I have just tried


<% If lngLoggedInUserID = "" THEN
response.Redirect("login_user.asp")
END IF%>

and it still goes to the page, it doesn't redirect?!
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 11 February 2009 at 6:03pm
Originally posted by jarv jarv wrote:

I have just tried


<% If lngLoggedInUserID = "" THEN
response.Redirect("login_user.asp")
END IF%>

and it still goes to the page, it doesn't redirect?!



That would not work because that variable is a number and not a text string.

It will be 1 for the default admin, 2 for guests and the rest of the members will be which ever number the database assigned them, so it would never be "empty" as it were.

Also, as stated in my tutorial you should always close the database before redirecting.

S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 11 February 2009 at 6:08pm
Originally posted by crackerjacks crackerjacks wrote:

Originally posted by crackerjacks crackerjacks wrote:

Originally posted by Scotty32 Scotty32 wrote:

I've got a tutorial on how to make Member-Only Pages.
 
I have tried this with no success as well.
 
Making some headway, but now instead of proceeding to the page that I was trying to go to, it takes me to login page but does not go back to the orginal page I wanted to go to after I log in. Any sugestions?


My tutorial simply allows people to block access to guests on pages off their website outside of the forum.

You can have the user taken back to the page they was redirected from by adding the following in red:

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

%>


How ever if your protected page is outside of the forums folder (eg not in www.site.com/forum/) then the forum will strip out the directory and attempt to load the page within the forums folder (eg www.site.com/forum/pagename.asp)

This is designed to stop hackers redirecting users away from your site or injecting malicous code into your website.
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.