Get Variabel In Fpdf

really need help, please…

I have made a web using fpdf. but the problems I can`t get variable in fpdf

I have made a form, when i click "submit", the variables sent to coba1.php

in controller PemohonController.php


function actionCoba1($id){


    $this->renderPartial('coba1',array(

'model'=>$this->loadModel($id)));


}

in coba1.php


<?php

Yii::import('application.extensions.fpdf.*');


$model=$_GET['model'];

class coba1 extends fpdf

{

// Page header

 

function Header()

{

   

    // Logo

   // $this->Image('bpn.jpg',1,2,2.5,2.5);

    // Arial bold 15

    $this->SetFont('Times','B',15);

    // Move to the right

    //$this->Cell(<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/cool.gif' class='bbc_emoticon' alt='8)' />;

    // Title

    $this->Cell(0,2.54,'BADAN PERTANAHAN NASIONAL REPUBLIK INDONESIA',0,0,'C');

	$this->ln(0.75);

	$this->Cell(0,2.54,'KANTOR PERTANAHAN KOTA PEKANBARU',0,0,'C');

	$this->ln(0.75);

	$this->Cell(0,2.54,'PROVINSI RIAU',0,0,'C');

	$this->ln(0.75);

	$this->SetFont('Times','',13);

	$this->Cell(0,2.54,'JALAN PEPAYA NO.47 TELP.(0761)23106-PEKANBARU',0,0,'C');

	$this->ln(0.75);

       $this->Cell(0,2.54,$model->id,0,0,'C');

	$this->ln(0.75);

	$this->SetLineWidth(0.07);

	$this->line(0.54,5,21,5);	

}

Hi, not sure if you fixed the problem, but I think it might be helpful to someone.

In your class:




<?php

class coba1 extends fpdf

{

    var $model;


    // Page header

    function Header()

    {

        // ...

    }

}



Outside your class:




$pdf = new coba1();

$pdf->model = $model;



No need for $model = $_GET [‘model’], as $model is allready accessible to the file (but not the class, hence the need to write $pdf->model = $model)