Log in

View Full Version : help with vb coding


laurens800
04-23-2008, 04:22 PM
<?

define('THIS_SCRIPT', 'test');

if($vbulletin->userinfo['userid'] == 9){
echo("Good");
} else {
echo("Bad");

}





?>

When i try this it does not give and value tried to add global but did not worked either any idea what i did wrong?

Opserty
04-23-2008, 04:32 PM
<?php

define('THIS_SCRIPT', 'test');

//===========================
// If your outside forum root:
$cwd = getcwd();
chdir('path/to/forumdir');
require_once('global.php');
chdir($cwd);
//===========================
// Else if your inside forum root:
require_once('global.php');
//===========================

// Now your code:
if($vbulletin->userinfo['userid'] == 9)
{

echo 'Good';
}
else
{
echo 'Bad';
}
?>

laurens800
04-23-2008, 06:35 PM
:D Thanks works :D

Sorry :P i'm new to code with vb :/