i have the following code, which when a form is filled in and submitted, it will write the data to a text file. When i tested offline that is on my IIS web server it worked fine. however, when i uploaded the site online, the script still works fine, except that the new lines are not taking effect and instead all the info is being displayed on the same line. Any ideas why this happens ?
<?php
$fullname = @$_POST["fullname"];
$country = @$_POST["country"];
$reason = @$_POST["reason"];
$email = @$_POST["email"];
$comments = @$_POST["comments"];
$values = "New Comment\r\n";
$values .="===========\r\n\n";
$values .="FullName: $fullname\r\n";
$values .="Country: $country\r\n";
$values .="Reason: $reason\r\n";
$values .="Email: $email\r\n";
$values .="Comments: $comments\r\n";
$values .="================\r\n\n";
$fp = @fopen("../contact.txt", "a") or die ("couldn't create file");
$numBytes = @fwrite($fp, $values) or die("Couldn't write to file!");
@fclose($fp);
?>
Thank You