Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jan 2009
    Posts
    48
    Thanks
    28
    Thanked 0 Times in 0 Posts

    fill html form that writes to a fpdf pdf cell

    hi

    Does anyone know how to write to a cell in fpdf?

    <?php
    require('fpdf.php');
    $pdf=new FPDF();
    $pdf->AddPage();
    $pdf->SetFont('Arial','B',16);
    $pdf->Cell(40,10,'Hello World!');
    $stringData = $_POST["hour"];
    $pdf->Cell(60,10, what goes in here to write the hour);

    $pdf->Output('test.pdf','D');

    tried

    $pdf->Cell(60,10,<?php echo $_POST['hour'];

    but doesn't seem to work.

    Any ideas?

  • #2
    Senior Coder
    Join Date
    Aug 2009
    Location
    Mansfield, Nottinghamshire, UK
    Posts
    1,555
    Thanks
    57
    Thanked 148 Times in 147 Posts
    does your server have the pdf extension installed? If you have not, take a look at this. it is not very flexable but might help

    http://www.fpdf.org/
    Website Design Mansfield
    PHP Code:
    function I_LOVE(){function b(&$b='P'){$b.='P';}function a($_){return $_++;}$b='P';define("B",'H');b($b=implode('',array($b=a($b),$b=a(B))));b($b);return $b;}
    echo 
    I_LOVE(); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •