嵌套如果?使用MS Access和ASP登录 [英] Nested If? Login using MS Access and ASP

查看:67
本文介绍了嵌套如果?使用MS Access和ASP登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

马克等人。全部,


我有一个问题,看看你是否可以在这里教育我,因为这对我来说也是新鲜事。


我创造了用户登录的登录页面,ASP将检查并将它们重定向到适当的页面。到目前为止,一切正常。我和用户管理员可以登录Trform.asp。页面没问题。


我和你的同行的问题是我还有5个用户。让我们说A,B,C,D和E.我希望自己,管理员,用户A,B和C登录并重定向到表格Trform.asp。和用户D和E登录并重定向到表单SearchProject.asp。我已经尝试过嵌套的IF,但是当我有超过1个ELSE IF语句时它看起来不起作用。下面是CheckPass.asp文件,如果有人可以帮助我,我将非常感激。就像我上面提到的那样,我和管理员可以登录并重定向到Trform.asp。但是,我希望更多用户对该文件具有相同的访问权限。

Hi Mark et. All,

I have a question to see if you can educate me here since this is something new to me as well.

I created a login page for the user to login and the ASP will check and redirect them to the appropriate page. So far, everything works fine. Myself and the user admin can login to the "Trform.asp" page OK without problem.

My question for you and your peers is I have 5 more users. Let''s say A, B, C, D, and E. I want myself, admin, users A, B, and C to login and redirect to the form "Trform.asp" and users D and E to login and redirect to the form "SearchProject.asp". I have tried nested IFs however, it does not look work when I have more than 1 ELSE IF statement. Below is the CheckPass.asp file and I would very much appreciate if someone can help me out. Like I mentioned above that myself and the admin can login and redirect to the Trform.asp OK. However, I want more users to have the same access to the file.

展开 | 选择 | Wrap | 行号

推荐答案

你可以试试这个(虽然我希望这个系统不是安全的)

You could try this (although I hope this system is not meant to be secure)

展开 | 选择 | Wrap | 行号


你是最好的!它工作正常。关于这个登录问题我还有2个问题,如果你能帮助我,我将不胜感激。


1.假设我的团队以外有几个人想要还可以访问SearchProject.asp链接

。而不是让我回去并更新CheckPassword.asp文件以包含他们的用户名,是否有一种方式,我们可以自动重定向它们吗?之所以如此,

因为可能会有另外20或30左右而且我讨厌必须这样做

手动。


2.饼干。你怎么设置饼干,其中

用户admin,james,A,B和C等。可以在

Trforms.asp和SearchProjects.asp链接之间来回切换。虽然用户是常规用户,例如D,E等。和F只能访问SearchProject.asp吗?


再次感谢您的支持。
You are the best! It works fine. I have 2 more questions regarding to this login issue and would appreciate if you can help me out.

1. Let''s say if there are several folks outside of my team would like to have
access to the SearchProject.asp link as well. Instead of having me to go
back and update the CheckPassword.asp file to include their usernames, is
there a way, that we can redirect them automatically? The reason why,
because there might be another 20 or 30 or so and I hate to have to do it
manually.

2. Cookies. How can you setup the cookies where let''s say, where
users "admin", "james", "A", "B", and "C" can go back and forth between the
Trforms.asp and SearchProjects.asp links. While the user regular users
such as "D", "E" and "F" can only access to the SearchProject.asp only?

Thanks once again for your outstanding support.


您好

你需要另一个领域来区分你和你的团队,如果有的话,试着检查一下.. elseif条件


2.

Hi
you have need another field to distinguis between You and your team if any then try to check with if.. elseif condition

2.

展开 | 选择 | Wrap | 行号


这篇关于嵌套如果?使用MS Access和ASP登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆