Topic: Login Detection
First off I would like to apolpgize for asking so many questions once someone answers this problem I will cut back greatly...
Also I know this is a punbb forum but I have VBulletin installed and have a problem not with VBulletin but with PHP...
Ok here is my problem: I am trying to make a type of detection thing for my mainpage of my site punkera.net/index.php and its supposed to show "Welcome Back, [Username] hope you enjoy your stay!" if it detects your logged in if it detects that you not logged in or you a guest its supposed to say "( Login | Register )" so i have this for code
<?php
$login = 'Login';
$register = 'Register';
$userid = $bbuserinfo['userid'];
$username = $bbuserinfo['username']
?>
<?php
if ($userid)
{
echo "Welcome Back, " . $username . " hope you enjoy your stay!";
}
else
{
echo "<b>(</b> <a href=" . "forums/login.php" . ">" . $login . "</a> <b>|</b> <a href=" . "forums/register.php" . ">" . $register . "</a> <b>)</b>";
}
?>
I got $bbuserinfo['userid'] and $bbuserinfo['username'] from index.php of the url is punkera.net/forums/index.php ...
All this does is show "( Login | Register )" all the time even when the user is logged into the forum...
I hope someone can help me...
Here is a file you might need: the index.php of Vbulletin
EDIT: link works now
Sincerely,
Newera70
EDIT: I found this for the VBulletin login message if it helps any
if ($bbuserinfo['userid'])
{ // registered user
$showmemberwelcome = true;
}
else
{ // guest
$showmemberwelcome = false;
}