PDA

View Full Version : Show username on non VB page - How?


10-05-2000, 01:44 PM
Hello,

How do I go about showing my username on a non VB page?

And if the user is not logged in I want to show the logincode. Any ideas?

10-05-2000, 11:55 PM
You include global.php and reference $bbusername to access the username:

If you want a login just do something like this:

require("global.php");
if ($bbusername == "")
{
eval("\$logincode = \"".gettemplate("logincode")."\";");
echo $logincode;
}
else
{
echo "hello $bbusername";
}

10-06-2000, 08:37 AM
Ok another question:

How would I make it so that after I logged in, if bbusername was not found, it redirected back to the page where I logged in from.

So lets say I logged in from the homepage....instead of it redirecting me to the forum index page after login, it sent me back to the homepage.

I'm assuming using HTTP_REFERER some how.

Any ideas?