Mr_Floppy
08-14-2003, 07:16 PM
Why isn't this working?
<?php
$fileloc="guests.txt";
$file=fopen($fileloc,"r") or die("Error. Please go back and try again");
$line=fgets($file,4096);
print '<table width="75%" border="1" align="center"><b><tr><td>Name:</td><td>Date:</td><td>Comment:</td></tr>';
while (!feof($file)==false) {
list($name,$date,$comment)=explode(":",$line);
print "<tr><td>"+$name+"</td><td>"+$date+"</td><td>"+$comment+"</td></tr>";
$line=fgets($file,4096);
}
fclose($file);
?>
<?php
$fileloc="guests.txt";
$file=fopen($fileloc,"r") or die("Error. Please go back and try again");
$line=fgets($file,4096);
print '<table width="75%" border="1" align="center"><b><tr><td>Name:</td><td>Date:</td><td>Comment:</td></tr>';
while (!feof($file)==false) {
list($name,$date,$comment)=explode(":",$line);
print "<tr><td>"+$name+"</td><td>"+$date+"</td><td>"+$comment+"</td></tr>";
$line=fgets($file,4096);
}
fclose($file);
?>