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 ?

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

<br />
<table border="1" width="750" cellpadding="0" cellspacing="3" class="pageme">
	$sql="SELECT * FROM account_file WHERE class='Iклас' AND subject='Български език' ORDER BY date DESC";
	$result=mysql_query($sql) or die(mysql_error());
	{ print "<span style='font-size:15px;'>Не сте прикачвали файлове.</span>"; }
	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>
<div class="pager"></div>
<br /><br />

thanks in advance

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.