I get the following error:
Undefined variable: _get in ... this is the part of the code that is causing it:
<?php
require_once("includes/config.php");
//
require('C:\xampp\htdocs\geochronology\vendor\setasign\fpdf\fpdf.php');
$pdf = new FPDF();
$pdf->AddPage();
$search=isset($_REQUEST['search']) ? $_REQUEST['search']:'';
$option=isset($_REQUEST['option']) ? $_REQUEST['option']:'';
$period=isset($_REQUEST['period']) ? $_REQUEST['period']:'';
$datefrom=isset($_REQUEST['datefrom']) ? $_REQUEST['datefrom']:'';
$dateto=isset($_REQUEST['dateto']) ? $_REQUEST['dateto']:'';
if($period ==null){
$sql = "SELECT * FROM tblfacility JOIN tbluser on tbluser.id=tblfacility.user where ".$search." ='".$option."' ";}
else{
$sql="SELECT * FROM tblfacility JOIN tbluser on tbluser.id=tblfacility.user where ".$search." ='".$option."' AND time between '".$datefrom."' and '".$dateto."' ";
}
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $row) {
$pdf->SetFont('Arial','',12);
$pdf->Ln();
foreach($row as $column)
$pdf->Cell(40,10,$column,1);
} }
$pdf->Output();
?>
It is giving a blank output.FIle problem may be with variable option and search .