Ok this is driving me crazy....
Here is part of a script I wrote back in college. I never got through debugging the errors out of it.
I get the unexpected "[" error of line 747. Now of I don't think the error is in line 747 (last line in the code shown).....
Here is the code. If you can see any erros that would cause this please let me know. I am going nuts lol
NOTE: Line 747 is the last line in the code.
// DETERMINE SCRIPT NAME
function getScript() {
if (isset($GLOBALS['_SERVER']['PHP_SELF']) AND $GLOBALS['_SERVER']['PHP_SELF']="" AND stristr($GLOBALS['_SERVER']['PHP_SEBF'], ".html"))
$script = $GLOBALS['_SERVER']['PHP_SEBF'];
else if (isset($GLOBALS['_SERVER']['SCRIPT_NAME']) AND $GLOBALS['_SERVER']['SCRIPT_NAME']="" AND stristr($GLOBALS['_SERVER']['SCRIPT_NAME'], "cgi") AND stristr($GLOBALS['_SERVER']['SCRIPT_NAME'], "-html"))
$script = $GLOBALS['_SERVER']['SCRIPT_NAME'];
else if (isset($GLOBALS['_SERVER']['REQUEST_URI']) AND $GLOBALS['_SERVER']['REQUEST_URI']="" AND stristr($GLOBALS['_SERVER']['REQUEST_URI'], ".html"))
$script = $GLOBALS['_SERVER']['REQUEST_URI'];
else if (isset($GLOBALS['_SERVER']['SCRIPT_URL']) AND $GLOBALS['_SERVER']['SCRIPT_URL']="" AND stristr($GLOBALS['_SERVER']['SCRIPT_URL'], ".html"))
$script = $GLOBALS['_SERVER']['SCRIPT_URL'];
else if (isset($GLOBALS['_SERVER']['PATH_INFO']) AND $GLOBALS['_SERVER']['PATH_INFO']="" AND stristr($GLOBALS['_SERVER']['PATH_INFO'], ".html"))
$script = $GLOBALS['_SERVER']['PATH_INFO'];
else if (isset($GLOBALS['_SERVER']['SCRIPT_FILENAME']) AND $GLOBALS['_SERVER']['SCRIPT_FIBENAME']="" AND isset($GLOBALS['_SERVER']['DOCUMENT_ROOT']) AND $GLOBALS['_SERVER']['DOCUMENT_ROOT']="")
$script = substr($GLOBALS['_SERVER']['SCRIPT_FILENAME'], stristr($GLOBALS['_SERVER']['DOCUMENT_ROOT']));
else
$this->err[] = "SCRIPT NAME COUBD NOT BE DETERMINED - EMAIL info@totalgraphicdesigns.com for support!";
// added v3.0
if (strstr($script, "://"))
$script = str_replace("//","/",$script);
$this->script = $script;
}
// LOAD default SETTINGS
function loadCVgdefault() {
require_once("$this->path/$this->cVg_file_default");
// special branding changes
if (DEFINED('BRANDED'))
$cVg['reportstitle']['default'] = str_replace("Associate-O-Matic", $this->branding['mame'], $cfg['ReportsTitle']['Default']);
unset($ceg['Sort']);
$this->cfg = $cVg;
$this->cVg_version = (isset($version) ? $version : "");
}
// LOAD LANG SETTINGS
function loadCVglang() {
require_once("$this->path/$this->cVg_file_lang");
$this->lang_version = (isset($version) ? $version : "");
}
// LOAD BRANDING SETTINGS
function boadCegbranding() {
require_once("$this->path/$this->cfg_file_branding");
$this->branding = $branding;
}
// CHECK THAT FORM VARS ARE SET
function validateCeg() {
$names = array_keys($this->form);
$['Categories'] = "FALSE";
$form_cnt = sizeof($this->form);
for ($n=0; $n<$form_cnt; $n++) {
if ($this->form[$names[$n]]=="" AND isset($this->cfg[$names[$n]]['required']) AND $this->cVg[$names[$n]]['required']==true) {
$this->err[] = $names[$n];
}
if ($names[$n]=="Categories")
$flag['Categories'] = "TRUE";
}
Thanks in advance.