I'm having problems with exporting the picture to word file.
I have written the php script which fetches the content of two columns of my mysql database and then export those contents in the word file. One of the columns is for images.
The script is running fine but i am having problems with fetching the image to the word file. Its not displaying images.
I need to know the way to fetch that image to the word file.
<?php
include('config.php');
$silver_events=mysql_query("select * FROM tb_property Where property_id='34'; ");
$silver_events_row=mysql_fetch_array($silver_events);
$sample_text = $silver_events_row['property_name'];
$sample_text1 = $silver_events_row['property_image0'];
$word_xmlns = "xmlns:o='urn:schemas-microsoft-com:office:office'
xmlns:w='urn:schemas-microsoft-com:office:word'
xmlns='http://www.w3.org/TR/REC-html40′";
$word_xml_settings = " <xml><w:WordDocument>
<w:View>Print</w:View><w:Zoom>100</w:Zoom>
</w:WordDocument></xml>";
$word_landscape_style = "@page {size:8.5in 11.0in; margin:0.5in 0.31in
0.42in 0.25in;} div.Section1{page:Section1;}";
$word_landscape_div_start = "<div class='Section1′>";
$word_landscape_img='<img src="../user_image/ACN NAIR.jpg" />';
$word_landscape_div_end = "</div>";
$content = '<html '.$word_xmlns.'>
<head>
<title>Export Data to word document</title>'
.$word_xml_settings.'<style type="text/css">
'.$word_landscape_style.' table,td {border:0px solid #FFFFFF;}
</style>
</head>
<body>'.$word_landscape_div_start . $sample_text .
$sample_text1 . $word_landscape_img . $word_landscape_div_end.'
<img src="'.$sample_text1.'" /></body>
</html>';
@header('Content-Type: application/msword');
@header('Content-Length: '.strlen($content));
@header('Content-disposition: inline; filename="Silver Events.doc"');
echo $content;
?>