få mysql info med billed ud som pdf fil
hej er der nogle der kan se hvad jeg gør forkert i dette script ville meget gerne have informationerne ud af mysql og et billed på der ligger i en mappe til de tilhørene informationer i mysql men kan få alle informationerne ud pånær billedet fra stien i mysql til mappen på serverenscriptet
<?php
include ('useall.php');
if (!isset($recID))
$recID = "";
if ($size == "4x6")
$width = 80;
else
$width = 105;
$recipe_title = "";
$recipe_portioner = "";
$recipe_image = "";
$recipe_ingredients = "";
$recipe_tilbered = "";
$recipe_arbejds = "";
$recipe_energi = "";
$recipe_fordeling = "";
$recipe_method = "";
$recipe_note = "";
$q = "SELECT * FROM recipe WHERE recipeID = '$recID'";
mysql_first_data ($q, "recipe_title|recipe_ingredients|recipe_fordeling|recipe_energi|recipe_arbejds|recipe_tilbered|recipe_portioner|recipe_image|recipe_method|recipe_note");
$recipe_title = htmlreserve($recipe_title);
$recipe_image = htmlreserve($recipe_image);
$recipe_portioner = htmlreserve($recipe_portioner);
$recipe_tilbered = htmlreserve($recipe_tilbered);
$recipe_arbejds = htmlreserve($recipe_arbejds);
$recipe_energi = htmlreserve($recipe_energi);
$recipe_fordeling = htmlreserve($recipe_fordeling);
$recipe_ingredients = htmlreserve($recipe_ingredients);
$recipe_method = htmlreserve($recipe_method);
$recipe_note = htmlreserve($recipe_note);
define('FPDF_FONTPATH', 'font/');
require('mc_table_indeks.php');
$pdf=new PDF_MC_Table('P','mm',$size);
$pdf->AliasNbPages();
$pdf->Open();
$pdf->SetMargins(13,13,10);
//1st Billed
if ($recipe_image && file_exists("/customers/domain.dk/domain.dk/httpd.www/opskrift/file/".$recipe_image))
{
$pdf->Cell(150,10,"BILLEDET EKSISTERER");
$pdf->ln(1);
$pdf->Image("/customers/domain.dk/domain.dk/httpd.www/opskrift/file/".$recipe_image,10,10);
}
//1st page
$pdf->AddPage();
$pdf->ln(1);
$pdf->SetFont('Arial', 'B', 11);
$pdf->MultiCell ($width, 5, $recipe_title,'0' ,'L');
//Portioner
$pdf->ln (5);
$pdf->SetFont('Arial', '', 8);
$pdf->SetTextColor(114,56,56);
$pdf->Cell ($width, 5, "Antal Portioner");
$pdf->ln (5);
$pdf->SetFont('Arial', '', 6);
$pdf->SetTextColor(0);
$pdf->MultiCell ($width, 3, $recipe_portioner,'0' ,'L');
//Tilberedningstid
$pdf->ln (5);
$pdf->SetFont('Arial', '', 8);
$pdf->SetTextColor(114,56,56);
$pdf->Cell ($width, 5, "Tilberedningstid ialt: ");
$pdf->ln (5);
$pdf->SetFont('Arial', '', 6);
$pdf->SetTextColor(0);
$pdf->MultiCell ($width, 3, $recipe_tilbered,'0' ,'L');
//Arbejds
$pdf->ln (5);
$pdf->SetFont('Arial', '', 8);
$pdf->SetTextColor(114,56,56);
$pdf->Cell ($width, 5, "Arbejds tid:");
$pdf->ln (5);
$pdf->SetFont('Arial', '', 6);
$pdf->SetTextColor(0);
$pdf->MultiCell ($width, 3, $recipe_arbejds,'0' ,'L');
//Ingredients
$pdf->ln (5);
$pdf->SetFont('Arial', '', 8);
$pdf->SetTextColor(114,56,56);
$pdf->Cell ($width, 5, "Ingredienser");
$pdf->ln (5);
$pdf->SetFont('Arial', '', 6);
$pdf->SetTextColor(0);
$pdf->MultiCell ($width, 3, $recipe_ingredients,'0' ,'L');
//Method
$pdf->ln (5);
$pdf->SetFont('Arial', '', 8);
$pdf->SetTextColor(114,56,56);
$pdf->Cell ($width, 5, "Fremgangsmetode");
$pdf->ln (5);
$pdf->SetFont('Arial', '', 6);
$pdf->SetTextColor(0);
$pdf->MultiCell ($width, 3, $recipe_method,'0' ,'J');
//Note
if (!empty($recipe_note))
{
$pdf->ln (5);
$pdf->SetFont('Arial', '', 8);
$pdf->SetTextColor(114,56,56);
$pdf->Cell ($width, 5, "Anbefalet tilbehør");
$pdf->ln (5);
$pdf->SetFont('Arial', '', 6);
$pdf->SetTextColor(0);
$pdf->MultiCell ($width, 3, $recipe_note,'0' ,'J');
}
$pdf->SetDisplayMode('real');
$pdf->SetTitle("$recipe_title");
$pdf->SetAuthor("domain.dk");
$pdf->SetCreator("Powered by navn - http://www.domain.dk");
$pdf->Output("recipe-$recID-$size.pdf", "I");
?>
