Function: is_loggedin

One of the most simplest yet most needed IPBSDK functions, basically determines if the visitor is a guest or a member.

One of the most simplest yet most needed IPBSDK functions, basically determines if the visitor is a guest or a member, you'll use this function a lot in member bars, member only pages, guest messages etc.. First off you'll need a php file with the <?php ?> tags setup.

First thing that is required at least once in the page is to require the sdk class.

require_once "sdk/ipbsdk_class.inc.php";
$SDK =& new IPBSDK();


Now you'll need to use php if and else using the function $SDK->is_loggedin()

if($SDK->is_loggedin())
{
    echo 'You are logged in!';
}

else
{
    echo 'You are not logged in!';  
}

Your whole page should look something like this
<?php

require_once "sdk/ipbsdk_class.inc.php";
$SDK =& new IPBSDK();

if($SDK->is_loggedin())
{
echo 'You are logged in!';
}

else
{
echo 'You are not logged in!';
}

?>

AddThis Social Bookmark Button AddThis Feed Button