0byt3m1n1
Path:
C:
/
wamp64
/
www
/
WaterCat
/
[
Home
]
File: drop.php
<?php require_once 'dompdf/autoload.inc.php'; use Dompdf\Dompdf; $id=$_GET['id']; $ph=$_GET['ph']; $alk=$_GET['alk']; $hdns=$_GET['hdns']; $cl=$_GET['cl']; $tds=$_GET['tds']; $iron=$_GET['iron']; $amonia=$_GET['amonia']; $nitrate=$_GET['nitrate']; $phs=$_GET['phs']; $rchl=$_GET['rchl']; $wtr=$_GET['wtr']; $rmks=$_GET['rmks']; $servername="localhost"; $username="root"; $password=""; $dbname="watercat"; $conn=mysqli_connect($servername,$username,$password,$dbname); $query="select * from info where id='$id'"; $result=mysqli_query($conn,$query); $html = ' <html> <head> <link rel="stylesheet" type="text/css" href="styles.css"> <style> table { border-left: 0.05em solid #ccc; border-right: 5; border-top: 0.05em solid #ccc; border-bottom: 5; border-collapse: collapse; } table td, table th { border-left: 5; border-right: 0.05em solid #ccc; border-top: 5; border-bottom: 0.05em solid #ccc; } </head> <body background="assets/images/slider/s1.jpg" alt="" > <table cellspacing="10px" cellpadding="10px"; align="center"> <tr> <th>pH</th> <th>ALKALINITY</th> <th>HARDNESS</th> <th>CHLORIDE</th> <th>TDS</th> <th>IRON</th> <th>AMMONIA</th> <th>NITRATE</th> <th>PHOSPHATE</th> <th>RESIDUAL CHLORIDE</th> <th>WATER LEVEL</th> <th>REMARKS</th> </tr> <tr> <td>'.$ph.'</td> <td>'.$alk.'</td> <td>'.$hdns.'</td> <td>'.$cl.'</td> <td>'.$tds.'</td> <td>'.$iron.'</td> <td>'.$amonia.'</td> <td>'.$nitrate.'</td> <td>'.$phs.'</td> <td>'.$rchl.'</td> <td>'.$wtr.'</td> <td>'.$rmks.'</td> </tr> </table> </body> </html>'; $dompdf=new Dompdf; $dompdf->loadHtml($html); $dompdf->setPaper('A4','landscape'); $dompdf->render(); ob_end_clean(); $dompdf->loadHtml(html_entity_decode($html)); $dompdf->stream('file.pdf'); ?>