Good day all , I've made a php script that extracts some data from a mysql table and creates a PDF with it.It works but some of the words have a '?' instead of the letters 'ș','ț','î','ă','î','â'.I don't know what causes that, I used FPDF library. Here is the code :
<?php
require('mysql_table.php');
class PDF extends PDF_MySQL_Table
{
function Header()
{
//Title
$this->SetFont('Arial','',18);
$this->Cell(0,6,'Titlu',0,1,'C');
$this->Ln(10);
//Table header
parent::Header();
}
}
//Connect to the database
mysql_connect('localhost','root','');
mysql_select_db('dct_2015_2016');
$pdf=new PDF();
$pdf->AddPage();
//Table
$pdf->AddCol('semestru',20,'Semestru','C');
$pdf->AddCol('facultate',40,'Facultate');
$pdf->AddCol('opt_id',20,'Optiune','C');
$pdf->AddCol('disciplina',100,'Disciplina','L');
$pdf->AddCol('cati_au_ales',20,'Persoane','C');
$prop=array('HeaderColor'=>array(255,150,100),
'color1'=>array(210,245,255),
'color2'=>array(255,255,210),
'padding'=>2);
$pdf->Table('select semestru,facultate,opt_id,disciplina,cati_au_ales from nr_optiuni order by semestru',$prop);
$pdf->Output();
?>
If I run the SELECT from mySql Admin the data is displayed correct , with the special characters.