Ok... I have a ton of different pages all which have the same little block of code. Up to now, I have been updating the $max = 150; over all the pages manually as the number changes. So I tried making a max.php with this single line in it and referencing it from all the others.
However.. here's a problem I have...
/vars/max.php
$max = 150;
/inc/changes.php
include 'vars/max.php';
echo $max;
Returns 150
/update/updatepage.php
include 'vars/max.php';
echo $max;
Returns 0
So.... It works on one page, but not on another. If I change max.php to this...
/vars/max.php
<?php
$max = 150;
?>
then the /inc/changes.php returns 0, and /update/updatepage.php returns 150.
Any ideas why?
I have already tried changing it to $GLOBALS["max"] but it's the same.
Is there a better way to do this so I only have to update the value in one place? I don't want to use a mysql database as my hosting company is a bit iffy with how many connections are in use.
Thanks for any help you can give.