The error I get is....
Parse error: parse error, expecting `'('' in /home/hsphere/local/home/wwwuse0/guardianhosting.net/plans.php on line 97
but, all my brackets are closed!!!!!!
I've checked it and checked it and checked it some more
I even ran a search on ( and a search on )
and I have 33 of each!!!
here's the source..... anyone have any ideas?????
<?php
/************************************************************************/
/* Displays the Guardain Hosting Plans
/* scripted by Troy, December 18, 2001
/* send $plan variable to this link
/*************************************************************************/
if (!isset($mainfile))
{
include("mainfile.php");
$index = 1;
include("header.php");
OpenTable();
// connect to database
$db_server= "localhost";//database server location
$db_type= "mysql";//mysql, pgsql, oracle, etc..
$db_db= "forum";//database to use
$db_username= "forum";//username for $db_db
$db_password= "forum";//password for $db_db
if(isset($CONNECT))
{
return;
}
$CONNECT=1;
if ($db_type == "mysql")
{
$mysql_link = mysql_connect("$db_server", "$db_username", "$db_password");
if (!$mysql_link)
{
print "<B>$l_error</B> <I>Can't connect to database</I>
";
exit;
}
mysql_select_db($db_db, $mysql_link);
}
$query = mysql_query("select * from home_plans where name = '$plan'");
$row = mysql_fetch_object($query);
$fp = fopen ("plan.tml", "r");
$fields = array("name",
"rate",
"setup",
"bw_free",
"bw_extra",
"bw_rate",
"hd_free",
"hd_extra",
"hd_rate");
$counter = 0;
if (isset($showcode))
{
print "The Parse Codes that you can use in the plan.tml file are<br><br>";
}
while(isset($fields[$counter]))
{
$parsecode[$counter] = "{";
$parsecode[$counter] .= $fields[$counter];
$parsecode[$counter] .= "}";
if (isset($showcode))
{
print $counter;
print $parsecode[$counter];
}
$counter++;
}
while (!feof ($fp))
{
$buffer = fgets ($fp, 4096);
if (strstr($buffer, "{"))
{
$counter = 0;
while(isset($fields[$counter]))
{
if strstr($buffer,$parsecode)
{
$parsed = str_replace($parscode, $field[$counter], $buffer);
}
$counter++;
}
echo $parsed;
}
else
{
echo $buffer;
}
}
fclose ($fp);
CloseTable();
include("footer.php");
}
?>
(Edited by LammaDog at 1:23 pm on Dec. 20, 2001)

New Topic/Question
Reply




MultiQuote




|