Yes you have to use a .php file to use php code, unless you know of some way to execute .php from a .shtml file
Anyway this is what I did to get it to work using a .php file. PHP can give you fits with the right path and such so you have to do a chdir. Without the $DOCUMENT_ROOT, the require will fail.
Code:
<?php
chdir($DOCUMENT_ROOT . "/forums");
require($DOCUMENT_ROOT . "/forums/global.php");
?>
Make sure you put this as the FIRST thing in your index.php, nothing before it, no spaces, etc. If you don't you will get warnings about header information already being sent. You won't see these warnings if you already have a cookie set on your forum but your guests will and you would never know it if you never log out.
Then just use the vb Variables, i.e. like this for example
Code:
<?php
if ($bbuserid != 0)
{ echo("welcome back, <b>$bbusername</b>"); }
else
{ echo("welcome <b>guest</b>!"); }
?>
[Edited by rangersfan on 08-21-2000 at 12:35 AM]