?
Dear all,
I want to get the Date for this page before the Epf No.
Given below are the codes.
<?php
require(“C:wampwwwfpdffpdf153fpdf.php”);
//echo date (“F j,Y”);
$ID=$_GET[‘ID’];
$dbhost=’localhost’;
$dbuser=’root’;
$dbpass=”;
$dbname=’metrosite’;
$epf=$
$db = mysql_connect(“localhost”, “root”,””) or die(mysql_error());
mysql_select_db(“metrosite”,$db) or die(“db problem”) ;
$sql = “SELECT e.Emp_No as epf,e.First_Name,e.Last_Name,e.Grade,e.Designation ,appraiser.Increment FROM emp e,appraiser where e.Emp_No=’$epf’ and e.Emp_No=appraiser.Mem_Epf_No”;
$result=mysql_query($sql) or die(mysql_error());
$row=mysql_fetch_array($result);
//echo(“hello”.$row[‘epf’]);
//echo($sql);
$pdf=new FPDF(“P”,”in”);
$pdf->AddPage();
$pdf->setFont(‘Times’,’B’,12);
//$pdf->pdf_show($pdf,’ ‘.date(“F j,Y”));
$pdf->Text(1.0,1.0,”Epf no: “.$row[‘epf’]);
$pdf->setFont(‘Helvetica’,”,12);
$y=1.5;
//$pdf->Text(1.0,$y,”Name:”);
//$pdf->Text(2.0,$y,$row[‘First_Name’].” “.$row[‘Last_Name’]);
$pdf->Text(1.0,1.5,$row[‘First_Name’].” “.$row[‘Last_Name’].” “.’,’);
$y+=.25;
//$pdf->Text(1.0,$y,”Designation: “.$row[‘Des’]);
$pdf->Text(1.0,$y,$row[‘Designation’].” “.’,’);
//$pdf->Text(2.0,$y,”66012334″);
$y+=.25;
$pdf->Text(1.0,$y,”Grade: “);
$pdf->Text(1.5,$y,$row[‘Grade’].” “.’.’);
$pdf->setFont(‘Helvetica’,’BU’,12);
$pdf->Text(3,2.5,”Increment Notification “);
$pdf->setFont(‘Helvetica’,”,12);
if($row[‘Increment’]==0)
{
$pdf->Text(1,3,”There is no increment for this year, Try and mprove your weaker aeras for the coming year.”);
}
else
$pdf->Text(1,3,”Your increment for this year is Rs.”.$row[‘Increment’].” /=, Please extend your valuable support and coopration this year too.”);
$pdf->Text(1,3.5,”Wish you all the best”.” “.’.’);
$pdf->Text(1,4,”Thank You”.” “.’,’);
$pdf->Text(1,4.2,”HR Manager”.” “.’.’);
$pdf->Output();
?>
Can any one help me, I am using fpdf.
Regards,
wasantha