0

I want to convert data that I retrieve from mySQL database into PDF on image click. I want to place image on each article from my website, and when someone click on that image, automaticaly gets pdf version of the article. How can I do that? Please help me.

For retrieve data from MySQL I use this:

<?php
$id = (int)$_GET['vij'];
$sql="SELECT id,news_title,news_text,publish_date,hit_count FROM news WHERE id=$id";
$result=mysql_query($sql);
while($rows=mysql_fetch_array($result)){
?>

and then call:

<? echo $rows['news_text']; ?>
damaki
  • 29
  • 4

1 Answers1

0

You could try TCPDF - a PHP class, that does not require any additional libraries. There are a lot of examples which are quite easy to use. It supports UTF-8, and has a lot of other features. Just visit the site.

CubicsRube
  • 71
  • 1
  • 3
  • 10