Please assist, im trying to create a script that will automatically generate a pdf document and then move to next record and generate a new pdf based on the data,
when i run the script the browser displays a blank page.
<?php
mysql_select_db($database_traces, $traces);
$query_rsTraceps = "SELECT * FROM traceps ORDER BY sfref";
$rsTraceps = mysql_query($query_rsTraceps, $traces) or die(mysql_error());
$row_rsTraceps = mysql_fetch_assoc($rsTraceps);
while ($row_rsTraceps = mysql_fetch_array($rsTraceps))
{
$value1 = $row_rsTraceps['sfref'];
require ('fpdf.php');
$pdf = new FPDF('P', 'mm', 'A4');
$pdf -> AddPage();
$pdf -> SetFont ('Arial','B', 10);
$pdf-> Image('traceps.jpg',10,6,50);
$pdf -> Ln(40);
$pdf -> Cell (25,5,"Reference :");
$pdf -> Cell (80,5,$row_rsTraceps['sfref'] ,1);
$pdf -> Ln(10);
}
when i run the script the browser displays a blank page.
<?php
mysql_select_db($database_traces, $traces);
$query_rsTraceps = "SELECT * FROM traceps ORDER BY sfref";
$rsTraceps = mysql_query($query_rsTraceps, $traces) or die(mysql_error());
$row_rsTraceps = mysql_fetch_assoc($rsTraceps);
while ($row_rsTraceps = mysql_fetch_array($rsTraceps))
{
$value1 = $row_rsTraceps['sfref'];
require ('fpdf.php');
$pdf = new FPDF('P', 'mm', 'A4');
$pdf -> AddPage();
$pdf -> SetFont ('Arial','B', 10);
$pdf-> Image('traceps.jpg',10,6,50);
$pdf -> Ln(40);
$pdf -> Cell (25,5,"Reference :");
$pdf -> Cell (80,5,$row_rsTraceps['sfref'] ,1);
$pdf -> Ln(10);
}
Comment