Hello,
I have a form consisting of 7 text-fields and 2 textarea-fields which are written to disk after the submit-button is pressed. Each new form-content is appended
to the file in the same manner.
When I want to view the content of the entire file with my program (content.php), I get all
forms written to the file in sequential order correctly written
into a text-window, that is a <br> and a new line after each text-field and textarea field. When I want to echo
the same to a html-window with the same program, then the
entire file-content is contiguously written as one huge line into the window.
How do I have to read the file, so that each text-field and text-area is written on a seperate line, followed by a <br> ?
my form-fields are:
Company (text)
name(text)
chr-name(text)
address(textarea)
message(textarea)
Subj(text)
Tel(text
Fax(text)
E-Mail(text)
Here is the program that puts the file-content correctly to the thext-window, but not to the html window:
<!DOCTYPE HTML PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN"
"<html>
<head>
<title>Auswertung-Eingabeformular</title>
</head>
<body bgcolor="gold">
<?php
$datei="/srv/ to open
$fp=fopen($datei,"r");
$inhalt=fread($fp,filesize($datei)); <<< read filecontent
echo "$inhalt";
?>
</body>
</html>
Thanks in advance for any help
Regards,
Fred
I have a form consisting of 7 text-fields and 2 textarea-fields which are written to disk after the submit-button is pressed. Each new form-content is appended
to the file in the same manner.
When I want to view the content of the entire file with my program (content.php), I get all
forms written to the file in sequential order correctly written
into a text-window, that is a <br> and a new line after each text-field and textarea field. When I want to echo
the same to a html-window with the same program, then the
entire file-content is contiguously written as one huge line into the window.
How do I have to read the file, so that each text-field and text-area is written on a seperate line, followed by a <br> ?
my form-fields are:
Company (text)
name(text)
chr-name(text)
address(textarea)
message(textarea)
Subj(text)
Tel(text
Fax(text)
E-Mail(text)
Here is the program that puts the file-content correctly to the thext-window, but not to the html window:
<!DOCTYPE HTML PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN"
"<html>
<head>
<title>Auswertung-Eingabeformular</title>
</head>
<body bgcolor="gold">
<?php
$datei="/srv/ to open
$fp=fopen($datei,"r");
$inhalt=fread($fp,filesize($datei)); <<< read filecontent
echo "$inhalt";
?>
</body>
</html>
Thanks in advance for any help
Regards,
Fred