Jump to content

[SOLVED] HELP ME!!!!


smd8061

Recommended Posts

I am trying to pull some info from my database and print it in the spots that I have the X and Y coordinates for. How would i print the info in the spots??????

 

 

<?php

//SHOW A DATABASE ON A PDF FILE
define('FPDF_FONTPATH','font/');
require('fpdf.php');

//Create a new PDF file
$pdf=new FPDF();
$pdf->Open();
$pdf->AddPage();

mysql_connect('HOST', 'USERNAME', 'PASSWORD')
    or die('Could not connect: ' . mysql_error());
mysql_select_db('software') or die('Could not select database');

$result=mysql_query('select Date,Name,TotalPrice from Invoices ORDER BY Date');
$number_of_products = mysql_numrows($result);


//Initialize the 3 columns and the total
$column_date = "";
$column_name = "";
$column_totalprice = "";
$total = 0;

mysql_close();

//Convert the Total Price to a number with (.) for thousands, and (,) for decimals.
$total = number_format($total,',','.','.');

//Fields Name position
$Y_Fields_Name_position = 20;
//Table position, under Fields Name
$Y_Table_Position = 26;
//Now show the 15 columns
//First Check
$pdf->SetFont('Arial','',18);
$pdf->Text(125,20,'Date'); <---- This should be replaced with database info
$pdf->Text(35,35,'Name');  <---- This should be replaced with database info
$pdf->Text(160,35,'TotalPrice');  <---- This should be replaced with database info
$pdf->Text(5,45,'One Million and 0/100 ****************************************');  <---- This should be replaced with database info

$pdf->Text(8,82,'Signature');  <---- This should be replaced with database info
$pdf->Output();
?>

Link to comment
https://forums.phpfreaks.com/topic/86531-solved-help-me/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.