i try that but i dont know what id and how it pull from database
function viewPdf($id = null)
{
if (!$id)
{
$this->Session->setFlash('Sorry, there was no property ID
submitted.1');
$this->redirect(array('action'=>'pay1'), null, true);
}
Configure::write('debug',0); // Otherwise we cannot use this method
while developing
$id = intval($id);
$property = $this->__view($id); // here the data is pulled from the
database and set for the view
if (empty($property))
{
$this->Session->setFlash('Sorry, there is no property with the
submitted ID.2');
$this->redirect(array('action'=>'pay1'), null, true);
}
$this->layout = 'pdf'; //this will use the pdf.ctp layout
$this->render();
}
On Thursday, September 20, 2012 2:24:17 PM UTC+7, manish bajaj wrote:
>
> use fpdf that is easy to use..
>
--
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.