<?php
require_once('../../include/config.php');

if (!isset($_POST['badge_id'])) exit("Invalid Request");

$badge_id = intval($_POST['badge_id']);
$result = $conn->query("SELECT * FROM exhibitors_badges WHERE id = $badge_id");

if ($result->num_rows === 0) exit("Badge not found");
$row = $result->fetch_assoc();
?>

<div id="badge" style=" 
width:350px;height:620px;margin:auto;position:relative; 
background:url('https://polymertubing.in/Shubham_Codes/admin-panel/assets/images/exhibitor-badge.png')
 no-repeat center;background-size:cover;">

 <div style="position:absolute;top: 160px;width: 100%; text-align: center;font-size: 25px;font-weight: 900;">
   <?= htmlspecialchars($row['name']); ?>
 </div>

 <div style="position:absolute;top: 192px;width: 100%; text-align: center;font-size: 15px;">
   <?= htmlspecialchars($row['designation']); ?>
 </div>
 <div style="position:absolute;top: 242px;width: 100%; text-align: center;font-size: 25px;font-weight: 900;">
   <?= htmlspecialchars($row['cmp_name']); ?>
 </div>

 <div style="position:absolute;top: 327px;left: 82px;font-size:14px;font-weight: 600;">
   <?= htmlspecialchars($row['email']); ?>
 </div>

 <div style="position:absolute;top: 357px;left: 82px;font-size:14px;font-weight: 600;">
   <?= htmlspecialchars($row['mobile_no']); ?>
 </div>
</div>


