PDA

View Full Version : php variable > cgi


H@K@N
03-16-2005, 08:40 AM
Hi,

i want to integrate CGI:IRC into my Forums.

In the CGI i have following code :


%items = (
Nickname => $ENV{REMOTE_USER} || $config->{default_nick},


In the Config File following :


# default nickname, a ? is replaced with a random number
default_nick = user???


Is it possible to use a variable $bbuserinfo[username] coming from vb3 as default_nick to be used in the cgi ?


th@nks und gr33tz

Deaths
03-16-2005, 09:02 AM
You can try the following things:
Replace

%items = (
Nickname => $ENV{REMOTE_USER} || $config->{default_nick},

By

%items = (
Nickname => $bbuserinfo[username],

OR

Replace

# default nickname, a ? is replaced with a random number
default_nick = user???

by

# default nickname, a ? is replaced with a random number
default_nick = $bbuserinfo[username]

One of the two should work.

In both cases you would need to add this near the top of the document (where the vars are set)
require_once('./global.php');

Or, when your code is in HTML or ASP (which I highly doubt) <?php require_once('./global.php'); ?>