I'm Running Centos5 have a solid php form that submits the raw data to an oracle database and then emails the user a copy of what they submitted. My next challenge is the take the input off of the form, jam it into a word doc and then attach as a LOB to oracle and then attach to the email that I'm already sending.
Using the generic example below, I can create that necessary *.doc file
<?
$fp = fopen("amit.doc", 'w+');
$str = "<B>This is the text for the word file created through php programming</B>";
fwrite($fp, $str);
fclose($fp);
?>
However when you open this up in MS Word it prompts you to pick the encoding type and when you open up the file, it's pretty much raw text (the bold tags in the above example are ignored). What do I have to do to have the *.doc understand html that I throw in there, simple sample like this:
<?
$comment = "<p align=center><b>HEADER LINE</b></p>";
$comment.= "blah, blah, blah";
$fp = fopen("amit.doc", 'w+');
fwrite($fp, $comment);
fclose($fp);
?>
Thank you,
Mark
Using the generic example below, I can create that necessary *.doc file
<?
$fp = fopen("amit.doc", 'w+');
$str = "<B>This is the text for the word file created through php programming</B>";
fwrite($fp, $str);
fclose($fp);
?>
However when you open this up in MS Word it prompts you to pick the encoding type and when you open up the file, it's pretty much raw text (the bold tags in the above example are ignored). What do I have to do to have the *.doc understand html that I throw in there, simple sample like this:
<?
$comment = "<p align=center><b>HEADER LINE</b></p>";
$comment.= "blah, blah, blah";
$fp = fopen("amit.doc", 'w+');
fwrite($fp, $comment);
fclose($fp);
?>
Thank you,
Mark