<?php
ob_start(); error_reporting(E_ALL); $i=$j=0;
echo "<body bgproperties='fixed' background='pics/anemos.bmp'>";
if (@mysql_connect('localhost', 'nik', 'macgyver'));
else @mysql_connect('localhost', 'root');
mysql_select_db('db_nik');
mysql_query("UPDATE visitor SET i=i+1");
$sql = mysql_query("SELECT i FROM visitor");
$i = mysql_fetch_array($sql);
$f = fopen("data.txt", "r");
$keimeno = fread($f, filesize("data.txt"));
if ($keimeno[$j]=='EOF') {mysql_query("UPDATE visitor SET i=0"); exit;}
?>
<center><table border='1' cellspacing='1' width='80%' id='AutoNumber1' bordercolor='Yellow' style='border-style: solid; border-width: 5' background='pics/brick.jpg'>
<tr>
<td align=left bordercolor='#ffcc00'> <font face='Com' size='4' color='LightBlue'>
<? while ($j<=$i[0]) echo $keimeno[$j++]; ?>
</td>
</tr>
</table>
<?
header("Refresh: 0; URL=http://localhost/test.php");
ob_end_flush();
?>
Everythings seems to work ok but i cannot seem to end the loop when the file ends why?
If u pls help!