i dont even know how to title this subject.
curious how i would go about inserting data from an array file i have name array.php into my cgi. i have a set of links at the bottom, and i change one of the anchors depending on the season #summer, #fall etc... i do this from my array.php file, and it changes it everywhere on my site except my error pages. i know i could just have custom error.php files.. but i like this little simple cgi script i use (and have been for years, it logs errors and mails me the ones i want..)
my question, i show do i insert it? typically in my php pages i include it as

<?php include('array.php'); ?>
<?=$thingsthatchange['unique_string'];?>

how can i call a variable

if (!$ENV{'REMOTE_HOST'}) {my @subnet_numbers = split (/\./, $ENV{'REMOTE_ADDR'});
$ENV{'REMOTE_HOST'} = gethostbyaddr(pack("C4", @subnet_numbers), 2) || $ENV{'REMOTE_ADDR'};
    }

$result=$ENV{'QUERY_STRING'};

&set_params;

if ($logem{$result} eq "Y")
  {&notification("L");}
if ($email{$result} eq "Y")
  {&notification("M");}

print "Content-type: text/html\n\n";
print "$msg{$result}\n";

sub set_params
{




$msg{'404'} =<<__404__;
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>error 404 || you did a boo boo </title>

</head>

<BR>
     <img src=$errorfourofour>
<table width="450px" border="0" cellpadding="18" cellspacing="0"><tr>
<td >
<div id="title">MISSING FILE: <b>$ENV{'REDIRECT_URL'}</b></div>
        <div id="contentsurrounding">
<font face=Courier New size=2>
i fear the file <b>$ENV{'REDIRECT_URL'}</b> is missing. Here is where i would like to insert the VAR! how?? tried <?=$thingsthatchange['unique_string'];?>, and ."$thingsthatchange['unique_string']".</font> 
</div>

__404__

hope i made myself clear enough.
sorry if i am confusing.

thanks
p

try to change short tag <?= with <?php echo in your script below:

<?php include('array.php'); ?>
<?=$thingsthatchange['unique_string'];?>

become

<?php include('array.php'); ?>
<?php ehco $thingsthatchange['unique_string'];?>

It is maybe your server not supported php short tags.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.