I have an issuer here, am busy designing my own website and I want my members to read the articles that I will be posting, so I have already designed mysql DB, Hence, I am able to retrieve the information from the data base when saving the file into folder, now I want to display the file, at the moment, I can display the file contents and no luck for the file itself. here is the code: //Retrieves data from MySQL $data = mysql_query("SELECT * FROM upload_articles WHERE hid=13") or die(mysql_error()); $row = mysql_fetch_array( $data ); $catid= $row['hid']; if($catid==0) { echo "No pdf file"; } else { //Outputs the file and other data $List = $row['file_name']; echo "File name = ".$List; echo "<p>File size = ".$row['size']; echo "<p>Uploaded date = ".$row['upload_date']; echo "<p>Title = ".$row['title']; echo "<p>hid = ".$row['hid']."<p>"; //open the file in the folder //$pdf = pdf_new(); pdf_open_file("articles/".$info['file_name'] .""); } Your help if of great importance to me many thanks tldmic
Are you trying to display the PDF file as HTML? Sorry, but I don't think that's possible. All you will probably see are garbage characters. You can use Google Doc Viewer instead to make your life easier. Just pass the link to the PDF file to it