Så vil den slet ikke skrive noget dennismp ....
Her er hele min php-fil:
************************************
<?php
$Submit = $_POST["Submit"];
$Name = $_POST["Name"];
$Email = $_POST["Email"];
$Comments = $_POST["Comments"];
$NumLow = $_REQUEST["NumLow"];
$NumHigh = $_REQUEST["NumHigh"];
$Name = stripslashes($Name);
$Email = stripslashes($Email);
$Comments = stripslashes($Comments);
// ###################################################################################
// ########## Reading and Writing the new data to the GuestBook Database #############
if ($Submit == "Yes") {
$filename = "GuestBook.txt";
$fp = fopen( $filename,"r");
$OldData = fread($fp, 80000);
fclose( $fp );
// Gets the current Date of when the entry was submitted
putenv("TZ=CET");
$Today = date ("d-m-y ( h:i:s A)"));
// Puts the recently added data into html format that can be read into the Flash Movie.
// You can change this up and add additional html formating to this area. For a complete listing of all html tags
// you can use in flash - visit:
http://www.macromedia.com/support/flash/ts/documents/htmltext.htm $Input = "Name: <b>$Name</b><br>Email: <b><u><a href=\"mailto:$Email\">$Email</a></u></b><br>Comments: <b>$Comments</b><br><i><font size=\"-1\">Dato: $Today</font><br><br>.:::.";
/* This Line adds the '&GuestBook=' part to the front of the data that is stored in the text file. This is important because without this the Flash movie would not be able to assign the variable 'GuestBook' to the value that is located in this text file */
$New = "$Input$OldData";
$fp = fopen( $filename,"w");
if(!$fp) die("&GuestBook=cannot write $filename ......&");
fwrite($fp, $New, 800000);
fclose( $fp );
}
// ###################################################################################
// ######### Formatting and Printing the Data from the Guestbook to the Flash Movie ##
$filename = "GuestBook.txt";
$fp = fopen( $filename,"r");
$Data = fread($fp, 800000);
fclose( $fp );
$DataArray = split (".:::.", $Data);
$NumEntries = count($DataArray) - 1;
print "&TotalEntries=$NumEntries&NumLow=$NumLow&NumHigh=$NumHigh&GuestBook=";
for ($n = $NumLow; $n < $NumHigh; $n++) {
print $DataArray[$n];
if (!$DataArray[$n]) {
Print "<br><br><b>No More entries</b>";
exit;
}
}
?>
****************************************