Jump to content

PiiiTeeeR

New Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by PiiiTeeeR

  1. <?php require_once('/home/agentCRM_PDF/tcpdf/tcpdf.php'); $rekord = $_REQUEST['record']; $GLOBALS['log']->fatal(" Cart = ".$rekord." user = ".$user->id); $query = "SELECT licznik, suma, technika FROM dane" $result = $this->bean->db->query($query, true); $row = $this->bean->db->fetchByAssoc($result); if($row[licznik]==0) $row[licznik]=0; if($row[suma]==0) $row[suma]=0; if($row[technika]==0) $row[technika]=0; $blad = "Licznik : ".str_pad($row[licznik],3,' ',STR_PAD_LEFT). '\n'.' Suma : '.str_pad($row[suma],5,' ',STR_PAD_LEFT).',00'. '\n'.' technika : '.str_pad($row[technika],5,' ',STR_PAD_LEFT).',00'; Header('Location: index.php='.$this->bean->id."&error=".$blad); ?> This is the whole code. It works for me. It displays in pop-up window Licznik: 0 Suma: 0 Technika: 0 I don't get errors but I don't know hot to make it pdf....
  2. Hi, I have a piece of code, which display a statement through the header function. How to "change" the code to open this data in pdf file? $query = "SELECT licznik, suma, technika FROM dane" $result = $this->bean->db->query($query, true); $row = $this->bean->db->fetchByAssoc($result); if($row[licznik]==0) $row[licznik]=0; if($row[suma]==0) $row[suma]=0; if($row[technika]==0) $row[technika]=0; $blad = "Licznik : ".str_pad($row[licznik],3,' ',STR_PAD_LEFT). '\n'.' Suma : '.str_pad($row[suma],5,' ',STR_PAD_LEFT).',00'. '\n'.' technika : '.str_pad($row[technika],5,' ',STR_PAD_LEFT).',00'; Header('Location: index.php='.$this->bean->id."&error=".$blad);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.