Date: 01/13/00
- Next message: vboy: "[PHPLIB] 2 login forms/validations in local.inc"
- Previous message: Louise: "Re: [PHPLIB] Self Registration"
- Next in thread: vboy: "[PHPLIB] 2 login forms/validations in local.inc"
- Maybe reply: vboy: "[PHPLIB] 2 login forms/validations in local.inc"
- Reply: Massimiliano Masserelli: "Re: [PHPLIB] 2 login forms/validations in local.inc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I have 2 areas in my web site which require 2 different login screens
and authenticate
users against 2 different tables,named user_parents and user_kids.
How do I accomplish this by modifying the local.inc with the latest
version of PHPLIB?
1) Should I use two different Auth Classes, named Kids_Auth and
Parents_Auth,
to contain 2 different version of auth_loginform() and
auth_validatelogin()?
Then I put open_page (...Kids_Auth...) and open_page
(...Parents_Auth..) on the top
of protected pages of kids and parents respectively.
I tried. But failed. Why?
2) I modified the class My_Auth to include "if... else..." in
auth_loginform() and
auth_validatelogin(). auth_loginform() is shown as follows:
[in class My_Auth]--------------------------------------------------
function auth_loginform() {
global $sess;
global $_PHPLIB;
if (ereg("/parents",$PHP_SELF)) {
include($_PHPLIB["libdir"] . "parents_login.ihtml");
} elseif (ereg("/kids",$PHP_SELF)) {
include($_PHPLIB["libdir"] . "kids_login.ihtml");
}
}
----------------------------------------------------------------------
When I load that page with open_page (... My_Auth...), it outputs
error message "..document contained no data, please try again later..."
Why? What exactly is the proper way to do my job?
Thank you very much for your attention.
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.
- Next message: vboy: "[PHPLIB] 2 login forms/validations in local.inc"
- Previous message: Louise: "Re: [PHPLIB] Self Registration"
- Next in thread: vboy: "[PHPLIB] 2 login forms/validations in local.inc"
- Maybe reply: vboy: "[PHPLIB] 2 login forms/validations in local.inc"
- Reply: Massimiliano Masserelli: "Re: [PHPLIB] 2 login forms/validations in local.inc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

