I am fetching the image from the database and the image folder.
now if i dont have the image in folder, it is giving me error:
FPDF error: Missing or incorrect image file: images/Photo/a.jpg
I am sorting the images from the folders according to the mysql database image field.
Now what i want is , if there is no image in the folder or if the image field is null, it should not throw me this error. Rather show me the default image which is already there in the folder.
The code i am using is :
$pict=$row['pict'];
$image1 = "images/Photo/$pict";
$pdf->SetX($xaxis);
$xaxis=$xaxis-55;
$yaxis=$yaxis+7;
$pdf->Cell(0,0,$pdf->Image($image1,$xaxis,$yaxis,25,29),0,0,'L',0);
$sign=$row['sign'];
$image2= "images/Signature/$sign";
$yaxis=$yaxis+35;
$pdf->Cell(0,0,$pdf->Image($image2,$xaxis,$yaxis,20,0),0,0,'L',0);
Okay. I have done it.
All i was supposed to do was: