I've done some searching on how to try and pass a user's info to a non-vb page. I tried the below, but its doesn't appear to be working correctly. Is this correct or close?
PHP Code:
chdir('../forums');
require_once('../forums/global.php');
require_once('../forums/includes/functions.php');
$userdata = $vbulletin->userinfo;
$sql = "SELECT * FROM mytable WHERE name = '".$userdata["username"]."'";