Hi!

I'm trying to add a login mechanism to my page. I copy-n-pasted the code from 
a posting to this list (thanks, Ingo :-) so I hoped for better luck this 
time, but what happens is that every time I hit the login button all I get is 
these two warnings:

Warning: Use of undefined constant logintype - assumed 'logintype' in 
code-global(10) : eval()'d code(19) : eval()'d code on line 132
 
 Warning: Undefined variable: nemein_net in code-global(10) : eval()'d 
code(19) : eval()'d code on line 161

Here's the code I'm using. Its located in the ROOT style element:
~~~~~~~~~~~~~~~~~~~~~~~~
<?php
$user=0;

if($_POST["login"]) {
    // Create the authentication session
    $result=auth_login($_POST["username"],$_POST["password"],1);
    if($result) {
        echo $result;
    }
    else{
        // Login was successful, get user information
        $user=mgd_get_person($midgard->user);
    }
}

else{
    // Refresh existing session from user's cookies
    $login_error=auth_by_cookies();
    if(!$login_error) {
        // Session validated, get user information
        $user=mgd_get_person($midgard->user);
    }
}

if($user){
// User found, show page content
?>
 <[head]>
 <[body]>
<?
}
else {
   // show login screen
?>
<[head-login]>
<[body-login]>
<?
}
?>

<?php
if (isset($midcom)) {
  // Call Finish to stop caching
  $midcom->finish();
}
?>
~~~~~~~~~~~~~~~~~~

As always, I'm most grateful for any hints you can give me.

Bye,

A.f.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to