CODIGO DEL FORMULARIO
delphi
<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1"> <table align="center"> <tr valign="baseline"> <td nowrap="nowrap" align="right">Contribuir con:</td> <td><input type="text" name="dblContribuir" value="" size="32" /></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right"> </td> <td><input type="submit" value="Generar" /></td> </tr> </table> <input type="hidden" name="fecha" value="<?php echo date("d/m/y") ?>" /> <input type="hidden" name="intCampana" value="<?php echo $row_Recordset2['idProyecto']; ?>" /> <input type="hidden" name="intUsuario" value="<?php echo $_SESSION['MM_IdUsuario']; ?>" /> <input type="hidden" name="MM_insert" value="form1" /> </form>
CODIGO DEL PDF
delphi
<?php require('pdf/fpdf.php'); class PDF extends FPDF { } //Declaracion de la Hoja $pdf = new PDF("P", "mm","Letter"); $pdf->SetMargins(20, 18); $pdf->AliasNbPages(); $pdf->AddPage(); //Datos del Titulo $pdf->Image('images/producenos2.png',10,8,33); $pdf->SetTextColor(0x00, 0x00, 0x00); $pdf->SetFont('Helvetica','B',9); $pdf->Cell(0, 5, "FACTURA PRODUCENOS.COM", 0, 1, "C"); // Texto $text = 'Para abonar esta factura, deberá dirigirse ... Esta factura ha sido creada ' . date('r'). //DATOS DE CONECCION mysql_connect("localhost","root",""); mysql_select_db("producenos"); //MOSTRAMOS LA TABLA $pdf->Ln(); $sql= "SELECT * FROM tblfactura"; $rec=mysql_query($sql); while($row=mysql_fetch_array($rec)) { $pdf->MultiCell(0, 8, $text); $pdf->Cell(30,10,$row['dblContribuir'],1,0); $pdf->Cell(30,10,$row['intUsuario'],1,0); $pdf->Cell(30,10,$row['intCampana'],1,0); } $pdf->Output(); ?>
Gracias!!