0

hi, everyone, i have a question abbout pdf and php. I use php , mysql and ajax in my page. After upload the pdf files i go in this page and get to data in table with paging. My question is hot to load the pdf files in same page when click the filepath on the table. What should i to add in the php where is

<td class='download'>".$row['filepath']."</td>

and what to add where is <div>reader</div> to view the pdf and save the file from there if i want ?

body>
<div class="h3" style="text-align:left;">Уроци по Български език 1 клас</div>
<div > 
reader
</div>

<br />
<div>
<table border="1" width="750" cellpadding="0" cellspacing="3" class="pageme">
	<tbody>
<?php
include"actionpages/dbconnect.php";
	$sql="SELECT * FROM account_file WHERE class='Iклас' AND subject='Български език' ORDER BY date DESC";
	$result=mysql_query($sql) or die(mysql_error());
	if(mysql_num_rows($result)==0)
	{ print "<span style='font-size:15px;'>Не сте прикачвали файлове.</span>"; }
	else{
	while($row = mysql_fetch_array($result))
	{
		print "<tr>
				<td class='lesson'>".$row['lesson']."</td>
				<td class='date'>".$row['date']."</td>
				<td class='download'><a  ref=".$row['filepath'].">Отвори</a></td>
			</tr>";
	}
	}
?>
	</tbody>
</table>
<div class="pager"></div>
</div>
<br /><br />

thanks in advance

2
Contributors
1
Reply
4
Views
6 Years
Discussion Span
Last Post by pritaeas
0

You want to display a PDF in a div you specify, is that correct ?

If so, I don't think it is possible, because it depends on the browser whether it can handle PDF files.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.