Hello,
Thanks in advance for your help, I have 3 pages generating the same
exact error on the same section of each page and I can't see the
problem - hoping a second set of eyes can help. I verified all
closing braces etc. and can't understand why the line in question is
generating a T_STRING error
Here is the code:
//-----------------------------------------------------
//THIS IS LINE 44
fuction dbConnect($aDbT able,$SQLstat)
// END OF LINE 44
{
global $dataRow, $db, $SQLstat, $Result;
if (!($db = odbc_connect('$ SQLstat','sa',' ')))
{
//Connection Error Check
print '<span class="error"> Could not establish connection to
$db.</span>';
exit;
}//end if
// Result error check
if (!($Result = odbc_exec($db,$ SQLstat)))
{
//exit if there are errors when executing SQL
print "####<BR>";
print "Query Used: <BR>";
print $SQLstat;
print ("<BR>");
print "####<BR>";
print ("Could not execute query: ");
$errorMsg = odbc_errormessa ge($db);
print ("'<span class=\"error\" > $errorMsg </span>'");
exit;
}//end if
}
$dataRow = odbc_fetch_arra y($Result);
}
Thanks in advance for your help, I have 3 pages generating the same
exact error on the same section of each page and I can't see the
problem - hoping a second set of eyes can help. I verified all
closing braces etc. and can't understand why the line in question is
generating a T_STRING error
Here is the code:
//-----------------------------------------------------
//THIS IS LINE 44
fuction dbConnect($aDbT able,$SQLstat)
// END OF LINE 44
{
global $dataRow, $db, $SQLstat, $Result;
if (!($db = odbc_connect('$ SQLstat','sa',' ')))
{
//Connection Error Check
print '<span class="error"> Could not establish connection to
$db.</span>';
exit;
}//end if
// Result error check
if (!($Result = odbc_exec($db,$ SQLstat)))
{
//exit if there are errors when executing SQL
print "####<BR>";
print "Query Used: <BR>";
print $SQLstat;
print ("<BR>");
print "####<BR>";
print ("Could not execute query: ");
$errorMsg = odbc_errormessa ge($db);
print ("'<span class=\"error\" > $errorMsg </span>'");
exit;
}//end if
}
$dataRow = odbc_fetch_arra y($Result);
}
Comment