hi
i want to echo the content of a pdf or word document(which is in my db) in the web page.but i dont want it to be displayed as pdf format,as it is in this code
i want to do it so that admin can edit every page as he likes with uploading the content. because with text area it is very limited.
for example if in .doc or .pdf file the first sentece is "it is hot today" i want to echo the exact format or if there is a picture...
is it a correct way for editing the web pages?if it is yes how should i change the code and if it is no how can i do it?
i want to echo the content of a pdf or word document(which is in my db) in the web page.but i dont want it to be displayed as pdf format,as it is in this code
Code:
<?php
require_once('config/database.php');
$rscRS = mysql_query("SELECT * from upload WHERE id=" . $_GET['id']) or die(mysql_error($rscDb));
$arrRow = mysql_fetch_assoc($rscRS);
header('Content-Type: application/pdf');
header('Content-Disposition: inline; filename='.$arrRow['name']);
header('Content-Size: '.strlen($arrRow['content']));
echo $arrRow['content'];
?>
for example if in .doc or .pdf file the first sentece is "it is hot today" i want to echo the exact format or if there is a picture...
is it a correct way for editing the web pages?if it is yes how should i change the code and if it is no how can i do it?
Comment