On Tue, Feb 06, 2001 at 12:40:34PM +0100, Emiliano mentioned:
> and then in the topof the page (or in the style, probably), do:
>
> if ($OptionalUserName && $OptionalPassword) {
> mgd_auth_midgard($OptionalUserName, $OptionalPassword, 0);
> $midgard = mgd_get_midgard();
> }
I have all this working nicely, as well as some "You aren't logged in so
I've provided you a nice little login box" stuff.
if ($logout=="logout") {
$logout_message = "You have just logged out";
setcookie("OptionalPasswordCookie");
setcookie("MidgardLogin");
unset($OptionalPassword);
unset($OptionalUserName);
}
if ($OptionalUserName && $OptionalPassword) {
mgd_auth_midgard($OptionalUserName, $OptionalPassword, 0);
setcookie ("OptionalUserNameCookie", $OptionalUserName);
setcookie ("OptionalPasswordCookie", $OptionalPassword);
$midgard = mgd_get_midgard();
$login_message="Welcome back, $OptionalUserName <FORM method=\"post\"
type=\"submit\"><INPUT type=\"submit\" name=\"logout\" value=\"logout\"></FORM>";
} else {
$login_message="<FORM method=\"post\">Username: <INPUT
name=\"OptionalUserName\"><BR> Password: <INPUT type=\"password\"
name=\"OptionalPassword\"><br> <INPUT type=\"submit\" value=\"login\"> </FORM>";
}
This sorta works. However, when I click logout, it seems to log me out -
brings me back to the page I was on, and the "login box" appears. However,
when I go back to that page later, I'm still logged in. Am I killing the
right cookies ?
john
--
When I say 'free', I mean 'free': free from bond, of chain or command:
to go where you will, even to Mordor, Saruman, if you desire. "
-- Gandalf, paraphrasing the choice between Free and Non-free software
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]