i'm trying to link a single entry into a pdf but everytime i run the script i get :
Notice: Undefined variable: row_Traceps in test.php on line 11
FPDF error: Some data has already been output, can't send PDF file
where am i going wrong i'm still learning php.
below is the script:
[CODE]
<?php require_once('Connections/traces.php');?>
<?php
mysql_select_db($database_traces, $traces);
$query_rsTraceps = "SELECT * FROM traceps WHERE id = 1";
$rsTraceps = mysql_query($query_rsTraceps, $traces) or die(mysql_error());
$row_rsTraceps = mysql_fetch_assoc($rsTraceps);
require ('fpdf.php');
$pdf = new FPDF('P', 'mm', 'A4');
$pdf -> AddPage();
$pdf -> SetFont ('Arial','B', 10);
$pdf -> Cell (40,10, $row_Traceps['id'] ,1);
$pdf -> Ln(20);
$pdf -> Cell (60,10,'Test',0,1,'C');
$pdf -> Output();
?>
[CODE]
Notice: Undefined variable: row_Traceps in test.php on line 11
FPDF error: Some data has already been output, can't send PDF file
where am i going wrong i'm still learning php.
below is the script:
[CODE]
<?php require_once('Connections/traces.php');?>
<?php
mysql_select_db($database_traces, $traces);
$query_rsTraceps = "SELECT * FROM traceps WHERE id = 1";
$rsTraceps = mysql_query($query_rsTraceps, $traces) or die(mysql_error());
$row_rsTraceps = mysql_fetch_assoc($rsTraceps);
require ('fpdf.php');
$pdf = new FPDF('P', 'mm', 'A4');
$pdf -> AddPage();
$pdf -> SetFont ('Arial','B', 10);
$pdf -> Cell (40,10, $row_Traceps['id'] ,1);
$pdf -> Ln(20);
$pdf -> Cell (60,10,'Test',0,1,'C');
$pdf -> Output();
?>
[CODE]
Comment