Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Password protection with group ID
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Password protection with group ID

 Post Reply Post Reply Page  12>
Author
judo2000 View Drop Down
Groupie
Groupie
Avatar

Joined: 05 November 2002
Location: United States
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote judo2000 Quote  Post ReplyReply Direct Link To This Post Topic: Password protection with group ID
    Posted: 21 February 2003 at 5:49pm

I am trying to setup a password protected site.  I have the login page setup and it works against an Access database.  I have added a groupID much like in the wwForm database.  When someone logs in they are redirected to another.  Different links will appear depending on which group they are in, but I cannot figure out how to check the groupID on the second page against the login id and password.  How can I pass the username and password to the rest of the pages in the password protected area.

Any help will be appreciated.



Edited by judo2000
If you are not willing to work hard to realize your dreams, why bother dreaming?
Back to Top
faubo View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 May 2002
Location: Brazil
Status: Offline
Points: 560
Post Options Post Options   Thanks (0) Thanks(0)   Quote faubo Quote  Post ReplyReply Direct Link To This Post Posted: 21 February 2003 at 7:20pm

use cookies

(sorry, I have no time today)

Back to Top
judo2000 View Drop Down
Groupie
Groupie
Avatar

Joined: 05 November 2002
Location: United States
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote judo2000 Quote  Post ReplyReply Direct Link To This Post Posted: 21 February 2003 at 7:23pm

Thats what I thought, but the groupID is in the database and not entered at login.  How can I use the cookie to get the groupID?

Thanks

If you are not willing to work hard to realize your dreams, why bother dreaming?
Back to Top
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2003 at 9:47am

im the stupid 1 so dont be surprised if this dont work...

cant you just have it so if they login you do

name = request.form("name")

sql = "select * from yourdb where name like '" & name & "'"

then do something like.....

if rsportal("GROUPID") = "1" then

do what ever

else

do what ever

END IF

 

Im not sure if any of this code works but atleast im trying... practice makes perfect i hope....



Edited by skyworld
Back to Top
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2003 at 9:50am
man am i ever having a bad spelling day had to edit that 3 times...
Back to Top
faubo View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 May 2002
Location: Brazil
Status: Offline
Points: 560
Post Options Post Options   Thanks (0) Thanks(0)   Quote faubo Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2003 at 10:08am

if you don't want to check the DB each page,

when you check the login vs password, the DB is open, you can write a cookie then with your ID field

Back to Top
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2003 at 10:13am

IF this works....

name = request.form("name")

sql = "select * from yourdb where name like '" & name & "'"

then do something like.....

if rsportal("GROUPID") = "1" then

response.cookies("ID") = "1"

elseif rsportal("groupid") = "2" then

response.cookies("ID") = "2"

else if rsportal("groupid") = "3" then

response.cookies("ID") = "3"

else

response.cookies("ID") = "0"

END IF

 

you can do elseif as many times you want or you can use the case 1....

But if you do that then you can have at the top of your pages...

If request.cookies("ID") = "0" then

'display codes for guests or what ever zero happens to be

elseif request.cookies("ID") = "1" Then

'Show the code for this group id OR

'response.redirect "page.asp"

and u need a else then a end if or you get a error....

Please dont critisize the stupid... Not every1 is as smart as -borg- cause the chances are that i waisted my time telling you a code that will never work ...

END IF

 

Back to Top
judo2000 View Drop Down
Groupie
Groupie
Avatar

Joined: 05 November 2002
Location: United States
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote judo2000 Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2003 at 7:54pm
I'll give these ideas a try. Thanks for the help.  I'll let you know if it works.
If you are not willing to work hard to realize your dreams, why bother dreaming?
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.