File: /home/kochikidswysewor/www/wp-content/themes/children-charity-child/invoice-data.php
<?php
include('../../wp-load.php');
?>
<?php
$amount = $_REQUEST['amount'];
// $child_id = $_REQUEST['child_id'];
// $sponsor_content = $_REQUEST['sponsor_content'];
// $sponser_array = array();
// $html_invoice$html_invoice ="";
// if(have_rows('sponsor_user_details',$child_id)):
// while(have_rows('sponsor_user_details',$child_id)): the_row();
// $sponser_array[] = get_sub_field('sponsors_',$child_id);
// endwhile;
// endif;
$html_invoice ='<h1>Hi Sponsor name,</h1>';
//$output = generatePDF($html_invoice);
echo $html_invoice;
ob_start();
// Include autoloader
require_once 'dompdf/autoload.inc.php';
// Reference the Dompdf namespace
use Dompdf\Dompdf;
// Instantiate and use the dompdf class
$dompdf = new Dompdf();
// Load HTML content
$dompdf->loadHtml('<h1>Welcome to CodexWorld.com</h1>');
// (Optional) Setup the paper size and orientation
$dompdf->setPaper('A4', 'landscape');
// Render the HTML as PDF
$dompdf->render();
$f;
$l;
if(headers_sent($f,$l))
{
echo $f,'<br/>',$l,'<br/>';
die('now detect line');
}
// Output the generated PDF to Browser
$rrr = $dompdf->stream();
?>?>