я в ситуации, когда мне нужно передать данные при отправке в форме HTML для обновления в базе данных MYSQL и сгенерировать PDF для этих отправленных данных.Он также должен содержать значения приращения, такие как генерация номера квитанции.
Мой pdf-код здесь написан на php.
<?php
require('fpdf.php');
class PDF extends FPDF
{
//Page header
function Header()
{
//Move to the right
$this->Cell(130);
//Title
include('connection.php');
mysql_select_db("inventory") or die("Couldn't find db");
$data = mysql_query("SELECT * FROM sold WHERE imei = '6135352313'");//This is where i need help how to get data from the HTML form after updating in MYSQL
while ($result1 = mysql_fetch_assoc($data))
{
$this->Cell(50,10,'CP '.$result1["receiptnumber"],1,1,'C'); //receipt number to be pulled from Auto_increment field in database
}
//Move to the right
$this->Cell(130);
//Date
$this->Cell(50,10,date("l F dS Y "),1,0,'C');
//Line break
$this->Ln(20);
}
//Instanciation of inherited class
$pdf=new PDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Arial','B',10);
include('connection.php');
mysql_select_db("inventory") or die("Couldn't find db");
$data = mysql_query("SELECT * FROM sold WHERE imei = '6135352313'"); //This is where i need help how to get data from the HTML form after updating in MYSQL
while ($result = mysql_fetch_assoc($data))
{
//Move to the right
$pdf->Cell(50,5,'Invoice To ',0,0,'R');
$pdf->SetFont('Arial','B',15);
$pdf->Cell(140,8,$result["firstname"]." ".$result["lastname"],1,1,'C');
$pdf->SetFont('Arial','B',10);
}
$pdf->Output();
?>