JezK
Edit File: user_profile.php.bak
<?php include('db_connect_db_new.php'); session_start(); $r_id = $_SESSION['rid']; $sql = "SELECT * FROM info_visitor WHERE ReceiptID = $r_id"; $re = mysqli_query($link, $sql); $result = mysqli_fetch_array($re, MYSQLI_ASSOC); ?> <html> <head> <meta content="text/html; charset=windows-1252" http-equiv="content-type"> <link rel="stylesheet" href="BootStrap/css/bootstrap.min.css"> <style> #col-1{ margin-left:-10%; } span { text-underline-position: right; font-size: 20px; } @media print { /* style sheet for print goes here */ .hide-from-printer{ display:none; } } .row{margin-top: 5%;margin-left: 20%;} @page { size: A4 landscape; float: right; width: 100%; border: 2px; padding: 0; font-size:10pt; display: inline-block; } </style> </head> <body> <div class="row" style="position:relative; "> <div class="col-sm-3" style="margin-left:30px;"> <img style="width: 200px; height: 224px; display:inline-block;" src="<?php echo $result['imagePath']?>" > </div> <div class="col-sm-4" style="position: relative; width: 634px; margin-left: 33px;display:inline-block;"> <p style="width: 678px;" id="col-1">Date :<?php echo $result['Date'];?> Time in : <?php echo $result['TimeIN']?></p> <br> <span id="col-1" name="main">Name : <?php echo $result['Name'];?></span><br> <span id="col-1">Contact No : <?php echo $result['Contact']?><br> <span id="col-1">Purpose : <?php echo $result['Purpose'];?></span><br> <span id="col-1">Meeting : <?php echo $result['meetingTo'];?></span><br> <span id="col-1">Receipt ID : <?php echo $result['ReceiptID'];?></span><br> <span id="col-1">Comment : <?php echo $result['Comment'];?></span><br> </span></div> </div> <br> <br> <div style="text-align:center;"> <button type="button" id="button" class="hide-from-printer" onclick="window.print()" value="Print Badge">Print Badge</button> <a type="button" id="button" class="hide-from-printer" href="front.php">Back </a></div> <a type="button" id="button" class="hide-from-printer" href="front.php"> </a> </body> </html>