Here's the script:
<?
@ $db = mysql_connect("localhost", "*", "");
if(!$db)
{
exit;
}
mysql_select_db("**");
if($id=="view")
{
$ip=$REMOTE_ADDR;
$result=mysql_query("select from tslstats where ip='$ip' and id='$ui'");
if(mysql_num_rows($result)==0)
{
$update=mysql_query("update tsl set hits=hits+1 where id='$ui'");
$instantkid=mysql_query("insert into tslstats
('$ip','$ui')");
}
$result=mysql_query("select * from tsl order by hits desc limit 0, 25");
for($i=0; $i<mysql_num_rows($result); $i++)
{
$row=mysql_fetch_array($result);
if($row["id"]==$ui)
{
$gif=$i+1;
}
}
header("Content-type: image/gif");
if(isset($gif))
{
require("button$gif.jpg");
}
else
{
require("button26.jpg");
}
}
mysql_close($db);
?>
There is no MySQL problem, and the button$gif.jpg shows up as needed. But when the script is told to require("button26.jpg"); I get this error:
<br />
<b>Parse error</b>: parse error, unexpected T_STRING in <b>/home/virtual/site6/fst/var/www/html/tsl/test/button26.jpg</b> on line <b>33</b><br />
Thanks for your help!