File manager - Edit - /home/asiatechinc/public_html/asiatechinc-websites/dhyeyaprakashan.com/dompdf/htmltopdf.php
Back
<?php include '../core/init.php'; mysqli_query($mysqli,"SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'"); mysqli_set_charset($mysqli,'utf8'); require_once 'autoload.inc.php'; use Dompdf\Dompdf; $dompdf = new Dompdf(); $id = $_GET['id']; $select = "SELECT * from `form` where id = '$id'"; $result = mysqli_query($mysqli,$select); while($result1 = mysqli_fetch_array($result)){ $id = $result1['id']; $name = $result1['name']; $Standard = $result1['Standard']; $medium = $result1['medium']; $birth = $result1['birth']; $mobile = $result1['mobile']; $school_name = $result1['school_name']; $school_address = $result1['school_address']; $post = $result1['post']; $area = $result1['area']; $district = $result1['district']; $pincode = $result1['pincode']; } $html = '<table class="table"> <thead> <tr> <th scope="col">STUDENT NAME</th> <th scope="col">STANDARD</th> <th scope="col">MEDIUM</th> <th scope="col">BIRTH</th> <th scope="col">MOBILE</th> <th scope="col">SCHOOL NAME</th> <th scope="col">SCHOOL ADDRESS</th> <th scope="col">POST</th> <th scope="col">AREA</th> <th scope="col">DISTRICT</th> <th scope="col">PINCODE</th> </tr> </thead> <tbody> <tr> <th scope="row">'.$name.'</th> <th scope="row">'.$Standard.'</th> <th scope="row">'.$medium.'</th> <th scope="row">'.$birth.'</th> <th scope="row">'.$mobile.'</th> <th scope="row">'.$school_name.'</th> <th scope="row">'.$school_address.'</th> <th scope="row">'.$post.'</th> <th scope="row">'.$area.'</th> <th scope="row">'.$district.'</th> <th scope="row">'.$pincode.'</th> </tr> </tbody> </table>'; $dompdf->loadHtml($html); // (Optional) Setup the paper size and orientation $dompdf->setPaper('A4', 'landscape'); // Render the HTML as PDF $dompdf->render(); // Output the generated PDF to Browser $dompdf->stream(); ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings