okay thanks smile

That helped me with what I needed to acomplish smile Thanks

Is there a way I can set it so when someone clicks the "logout" link in the navbar that it redirects then back to my main page instead of just refreshing the forums?

Thanks smile

I have tryed this to get it to show the users avatar after log in, but all I get is a blank page, any ideas??

heres the code im using

<?php
define('PUN_ROOT', './forum/');
require PUN_ROOT.'include/common.php';
define('PUN_QUIET_VISIT', 1);

if (!$pun_user['is_guest'])
      echo 'Hello '.pun_htmlspecialchars($pun_user['username']); 
    $avatardir = "forum/img/avatars"; {
            if ($img_size = @getimagesize($avatardir.'/'.$row_gastboken['usr_inlagg'].'.gif'))
                $user_avatar = '<img src="'.$avatardir.'/'.$row_gastboken['usr_inlagg'].'.gif" alt="" border="1"/>';
            else if ($img_size = @getimagesize($avatardir.'/'.$row_gastboken['usr_inlagg'].'.jpg'))
                $user_avatar = '<img src="'.$avatardir.'/'.$row_gastboken['usr_inlagg'].'.jpg" alt="" border="1"/>';
            else if ($img_size = @getimagesize($avatardir.'/'.$row_gastboken['usr_inlagg'].'.png'))
                $user_avatar = '<img src="'.$avatardir.'/'.$row_gastboken['usr_inlagg'].'.png" alt="" border="1" />';
    echo "$user_avatar"; }
else
{
    $redirect_url = '' ;
    if(isset($_SERVER['REQUEST_URI']))
        $redirect_url = $_SERVER['REQUEST_URI'] ;
 
    require PUN_ROOT.'lang/'.$pun_user['language'].'/login.php';

?>
            <form id="login" method="post" action="<?php echo PUN_ROOT.'login.php?action=in'; ?>">
                <input type="hidden" name="form_sent" value="1" />
                <input type="hidden" name="redirect_url" value="<?php echo $redirect_url ?>" />
                <?php echo $lang_common['Username'].' ' ?>
                <input type="text" name="req_username" size="13" maxlength="25" /> 
                <?php echo $lang_common['Password'].' ' ?>
                <input type="password" name="req_password" size="13" maxlength="16" /> 
                <input type="submit" name="login" value="<?php echo $lang_common['Login'] ?>" />                
            </form>
<?php

}

I tryed this but I'm getting this error

PHP Parse error:  syntax error, unexpected '<' in /home/webcoder/html/test2.php on line 29

on line 29 I have this

<pun_include "myfile.php">

Hey All,

I'm trying to add a login for the forums to the main page of my site. I've been through the integration guide, but I guess im not understanding, because any code I try results in my page coming up blank. I've scrapped my code for now till I can do more research, but some insite from you guys may help... I whipped up a quick image of what I'd like to acheve..

http://www.xalaris.net/imgtemp/loginbox.png

**UPDATE***

I created a test.php page and I have been able to get it to say "welcome guest" but I'm still confused on how to add the login box. this is my code so far

<?php

define('PUN_ROOT', './forum/');
define('PUN_TURN_OFF_MAINT', 1);
define('PUN_QUIET_VISIT', 1);
require PUN_ROOT.'include/common.php';

?>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
Welcome <?php echo pun_htmlspecialchars($pun_user['username']); ?>! Please Login!

</body>

</html>