neo_philiac
09-02-2008, 04:21 PM
What I am trying to do is simple. When I get the data from a text area in a textbox in a form , here is what I am doing to put it in a doc file.
$resume = $_POST['resume'];
$profile = $_POST['lname']."_"."Profile".$filedate.".doc";
$profile = fopen($profile, "w") or die( "Error opening file" );
flock ($profile, LOCK_EX);
$doc_content = "<html><head></head><body>
<b>Resume: </b> <br> $resume <br>
</body></html>";
fwrite ($profile, $doc_content);
Since it is a multiline text area, MS Word ignores the breaks in the text area.
so if i put:
Since it
is a multiline
text area.
It shows as
Since it is a multiline text area.
I think the way to get that is to take it (textarea) in an array and then append a break tag (<br>) at the end of each line. Am I in the right direction? If so, how do i do it?
Thanks
$resume = $_POST['resume'];
$profile = $_POST['lname']."_"."Profile".$filedate.".doc";
$profile = fopen($profile, "w") or die( "Error opening file" );
flock ($profile, LOCK_EX);
$doc_content = "<html><head></head><body>
<b>Resume: </b> <br> $resume <br>
</body></html>";
fwrite ($profile, $doc_content);
Since it is a multiline text area, MS Word ignores the breaks in the text area.
so if i put:
Since it
is a multiline
text area.
It shows as
Since it is a multiline text area.
I think the way to get that is to take it (textarea) in an array and then append a break tag (<br>) at the end of each line. Am I in the right direction? If so, how do i do it?
Thanks