Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - One more ASP question....
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

One more ASP question....

 Post Reply Post Reply Page  12>
Author
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post Topic: One more ASP question....
    Posted: 07 March 2003 at 11:59am
Ok, this is for a mod i'm making to integrate the wwf login whith the rest of the site, i need to make a variable with more than one value and then compare it with a single value variable...

example:
<%
intAllowGroups = "3,7"

If Not IntGroupID = intAllowGroups Then Response.Redirect "no_access.asp"
%>

Would that work just like that or do I need to make any changes since there's more than 1 value on the intAllowGroups variable?

Thanks in advance for your responses,
Fernan
Back to Top
boyohboy View Drop Down
Groupie
Groupie


Joined: 15 October 2002
Location: United States
Status: Offline
Points: 197
Post Options Post Options   Thanks (0) Thanks(0)   Quote boyohboy Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2003 at 12:10pm
what's in IntGroupID? intAllowGroups look like a string
Visit my community website @
EverythingVIET.com
Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2003 at 12:21pm
intGroupID is the forums Group ID #, like Moderator Group is 3, Admin 1, Guest 2, etc...
Back to Top
boyohboy View Drop Down
Groupie
Groupie


Joined: 15 October 2002
Location: United States
Status: Offline
Points: 197
Post Options Post Options   Thanks (0) Thanks(0)   Quote boyohboy Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2003 at 12:31pm
if you must use one variable intAllowGroups  for that, i guess you must parse, convert it to int first before the comparison cuz intgroupid is a singular int
Visit my community website @
EverythingVIET.com
Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2003 at 12:35pm
That's what I need to know how to do..............that might be a dumb question but I don't know sh*t about ASP...
Back to Top
boyohboy View Drop Down
Groupie
Groupie


Joined: 15 October 2002
Location: United States
Status: Offline
Points: 197
Post Options Post Options   Thanks (0) Thanks(0)   Quote boyohboy Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2003 at 12:45pm

<%

arrayVar = CInt(Trim(Split(intAllowGroups , ","))) 'split, trim space, convert to int
If Not IntGroupID = arrayVar(0) Then Response.Redirect "no_access.asp"
End If
%>

What the heck is 7 for?

Visit my community website @
EverythingVIET.com
Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2003 at 1:10pm
Thanks, 7 is the GroupID of a private group i got in my forums, i want only those members and moderators to access certain pages on my site...
Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2003 at 1:19pm
Tried it just like that and it gave me a type mismatch error on this line:

arrayVar = CInt(Trim(Split(intAllowGroups , ","))) 'split, trim space, convert to int

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.