Sign in to follow this  
Followers 0

[IPBSDK] Function: is_loggedin


Description

One of the most simplest yet most needed IPBSDK functions
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.

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

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

[code]if($SDK->is_loggedin())
{
echo 'You are logged in!';
}
else
{
echo 'You are not logged in!';
}[/code]

Your whole page should look something like this

[code]<?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!';
}

?>[/code]



0 Comments

There are no comments to display.