Php script debug


<?
if ($correct == "Yes") {
     $filename = "shout.txt";
     $fp = fopen( $filename,"r"); 
     $OldData = fread($fp, 80000); 
     fclose($fp); 
     	
     $Input = "Name: <b>$nName</b><br>Email: <b><u><a href=\"mailto:$nEmail\">$Email</a></b></u><br>Message: <b>$nMess</b><br>.:::.";

     $New = "$Input$OldData";
	
     $fp = fopen( $filename,"w"); 
     fwrite($fp, $New);
     fclose($fp); 
}
$filename = "shout.txt";
$fp = fopen($filename,"r"); 
$Data = fread($fp, 80000); 
fclose($fp);
	
$DataArray = split (".:::.", $Data);
$NumEntries = count($DataArray) - 1;
print "&TotalEntries=$NumEntries&nLow=$nLow&nHigh=$nHigh&GuestBook=";
for ($n = $nLow; $n < $nHigh; $n++) {
print $DataArray[$n];
     if (!$DataArray[$n]) {
          Print "<br><br><b>No More entries</b>";
          exit;
          }
     }
?>

I don’t get any errors, but for some reason it will not write to the textfile… Anybody want to take a swing at it?

oh, and the txt file is writeable. I have another script to check that and that script writes to the file fine…

I think I got it :slight_smile: