FPDF - 将输入回显到 table header
FPdf - echo input into table header
我正在做一份月度报告,我想在我的 table header 中回显我的下拉列表中选择的月份,这是我的代码:
$month=$_POST['month'];
$year=$_POST['year'];
mysql_connect('localhost','root','');
mysql_select_db('auth');
class PDF extends FPDF
{
// Page header
function Header1()
{
// Logo
$this->Image('header.png',30,10,150);
$this->SetFont('Arial','',15);
$this->Cell(0,89,'Employee Leave Monthly Report',0,0,'C');
$this->Ln(53);
}
如何在 header 中打印 $month?谢谢
只需添加 $month
即可打印出月份。例如,如果您想将 "Employee Leave Monthly Report" 更改为 "Employee Leave Monthly Report for May"(其中 May 是 $month 变量中的月份),您将拥有@
$this->Cell(0,89,"Employee Leave Monthly Report for $month",0,0,'C');
编辑:试试这个
$this->Cell(0,89,'Employee Leave Monthly Report for ' . $month,0,0,'C');
答案似乎只是$_POST[month]
我正在做一份月度报告,我想在我的 table header 中回显我的下拉列表中选择的月份,这是我的代码:
$month=$_POST['month'];
$year=$_POST['year'];
mysql_connect('localhost','root','');
mysql_select_db('auth');
class PDF extends FPDF
{
// Page header
function Header1()
{
// Logo
$this->Image('header.png',30,10,150);
$this->SetFont('Arial','',15);
$this->Cell(0,89,'Employee Leave Monthly Report',0,0,'C');
$this->Ln(53);
}
如何在 header 中打印 $month?谢谢
只需添加 $month
即可打印出月份。例如,如果您想将 "Employee Leave Monthly Report" 更改为 "Employee Leave Monthly Report for May"(其中 May 是 $month 变量中的月份),您将拥有@
$this->Cell(0,89,"Employee Leave Monthly Report for $month",0,0,'C');
编辑:试试这个
$this->Cell(0,89,'Employee Leave Monthly Report for ' . $month,0,0,'C');
答案似乎只是$_POST[month]