getting parse error on line 14 of this code:
<?php
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
$module_name = basename(dirname(FILE));
$index = 1;
include("header.php");
title("EXP Chain List");
OpenTable();
$result = mysql_query("select clid, chainname, chainlevel from ".$prefix."_chainlist" ORDER BY clid", $dbi);
if(!$result)
die(mysql_error());
$sresult = mysql_fetch_array($result);
echo "<center><table border=0>\n";
echo "<tr><td width=50 align=center><u>Order</u></td><td width=150 align=center><u>Name</u></td><td align=center><u>Level</u></td><tr>\n";
do {
$clid=$sresult[clid];
$chainname=$sresult[chainname];
$chainlevel=$sresult[chainlevel];
echo "<tr><td align=center>\n";
echo("$clid");
echo "</td><td align=center><i>\n";
echo("$chainname");
echo "</i></td><td align=right>\n";
echo("$chainlevel");
echo "</td></tr>\n";
} while($sresult = mysql_fetch_array($result));
echo "</table></center>\n";
CloseTable();
include("footer.php");
?>
it works fine without the ORDER BY clid on line 14, but eventually i will need to order my output by my primary field "clid"
anyone take a look and see if you find errors?
also im using nukephp portal, apache on linux server. editing in notepad, saving as php, and uploading in ascii.