Forums

This topic is locked

redirect depending on login

Posted 26 Jul 2001 22:54:26
1
has voted
26 Jul 2001 22:54:26 vernon whitkaer posted:
Problem: I have an access database with 3 different passwords in it. Ive built a login page for the start of my site BUT i need to redirect the users depending on which password they have entered, any ideas of how to achieve this.

thanks in advance

Replies

Replied 26 Jul 2001 22:59:21
26 Jul 2001 22:59:21 Joel Martinez replied:
you can accomplish this with a little bit of hand coding... (assuming you're using ASP/VBS)
<pre id=code><font face=courier size=2 id=code>SELECT CASE rs.Fields("yourField".value
CASE "admin"
response.redirect "admin.asp"
CASE "user"
response.redirect "user.asp"
CASE "guest"
response.redirect "guest.asp"
END SELECT</font id=code></pre id=code>
of course you'll have to customize the code to fit your needs, but that should set you on the right path.

Joel Martinez

----------
Is this thing on?....
Replied 27 Jul 2001 00:02:02
27 Jul 2001 00:02:02 Dennis van Galen replied:
i really have to learn a scripting language, any ideas for a book that will teach it to me like the Sams enhanced my UDev knowledge that was partially self taught and partially a 8 day MM certified training program, for 4 programs though, so it was alot in a short time for all of them.

In the meantime, should i use a "and" command if i want to apply this on two values coming from tables AccessLevel and ProjectGroup ?

i guess "then" is involved too, i should go to the TU bookstore tomorrow and get a VB book, but which ?

any recommendations ?

With kind regards,

Dennis van Galen
Webmaster SPG Finance
KPN Telecom Holland NV
Replied 27 Jul 2001 11:06:55
27 Jul 2001 11:06:55 vernon whitkaer replied:
hi Joel

thanks for your reply unfortunately im not a very acomplished programmer is there a way to do this by using the behaviours in Ultradev?

Replied 27 Jul 2001 15:48:38
27 Jul 2001 15:48:38 Joel Martinez replied:
djvgalen: unfortunately... a select statement can only compare 1 value... so if you want to do something with and, you've got to use <b>if Then elseif elseif elseif end if</b>

actually, one of the best resources for VBS/ASP is a website... www.4guysfromrolla.com taught me everything I know (along with www.aspmessageboard.com

vern.whitaker: unfortunately, I don't know of an SB that will do this...

Joel Martinez

----------
Is this thing on?....
Replied 27 Jul 2001 17:40:11
27 Jul 2001 17:40:11 Dennis van Galen replied:
Thanks Joel, I guess i have to write my own behavior <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>

I just bought me a copy of Mastering JavaScript and Jscript from Cybex, a massive 900 pages of helpfull text, I hope so, it covers Jscript 5 and Javascript 1.3. Is this a little up-to-date ?
I'm sure this is going to help me write my own behaviors, and because my boss said ok to 2 books and I couldn't find a decent VBS book I decided to also grab a copy of Sams mastering ASP 3.0 written by the guys from Rolla, heard lots of good things about that book, i'm sure these will get me started and I allready printed out every tutorial i could find on building behaviors so I am going to keep myself busy.

Once I learned myself Java and Jscript, is it hard to get into VBS ?

Be on the lookout for my first behavior soon, cause i NEED something that let's me redirect with 2 and maybe even more conditions, i don't want to end up with like 6 conditional regions on every page.

With kind regards,

Dennis van Galen
Webmaster SPG Finance
KPN Telecom Holland NV
Replied 27 Jul 2001 18:43:30
27 Jul 2001 18:43:30 Joel Martinez replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>Thanks Joel, I guess i have to write my own behavior <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle><hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

then you might want to get <b>Building DW4 and UD4 extensions</b> written by Ray West & Tom Muck
www.basic-ultradev.com

"and I'm not just saying that cuz he's my boss (ray)" it really is a good book.

as far as the Transition from java/script to VBS, from a programming perspective, it's pretty close. most every language has the same constructs:
-If Else
-SELECT Case
-Functions

but the syntax is totally different. if you'll be putting so much time into JS, you do know that you can write ASP with JScript right?
but the only downside to that, is that most examples and tuts on the web are done in VBS.

Joel Martinez

----------
Is this thing on?....

Reply to this topic