<?php
include("header.php")
?>

<?php 
		$about_banner="select*from otherpage where category='product_details'";
		$result=mysqli_query($conn,$about_banner);
		if($result && mysqli_num_rows($result)>0){
			while($row=mysqli_fetch_assoc($result)){
				$image=$row['image'];
			}
		}
		?>

<section class="elementor-section elementor-top-section elementor-element elementor-element-8912262 elementor-section-full_width elementor-section-stretched elementor-hidden-mobile elementor-section-height-default elementor-section-height-default" data-id="8912262" data-element_type="section" data-settings="{&quot;stretch_section&quot;:&quot;section-stretched&quot;,&quot;_ha_eqh_enable&quot;:false}">
						<div class="elementor-container elementor-column-gap-no">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-37c0c13" data-id="37c0c13" data-element_type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
								<div class="elementor-element elementor-element-6049f96 elementor-widget elementor-widget-image" data-id="6049f96" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img decoding="async" fetchpriority="high" width="1920" height="700" src="admin/upload/<?php echo $image;?>" class="attachment-full size-full wp-image-285" alt="" srcset="admin/upload/<?php echo $image;?> 1920w,admin/upload/<?php echo $image;?> 300w, admin/upload/<?php echo $image;?> 1024w, admin/upload/<?php echo $image;?> 768w,admin/upload/<?php echo $image;?> 1536w" sizes="(max-width: 1920px) 100vw, 1920px">															</div>
				</div>
					</div>
		</div>
							</div>
		</section>

<?php
$prod_id = $_GET['product_id']; // Get the ID from the URL
$sql = "SELECT pd.*, p.title AS product_name ,p.category AS product_cat,p.image AS product_image
FROM product_details pd
LEFT JOIN productpage p ON pd.product_id = p.id
where product_id='$prod_id'";
// Select specific fields from the `hostel` table
// $sql = "SELECT * FROM product_details WHERE product_id='$prod_id'";

$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_assoc($result); // Fetch the record

if ($row) {
	// Product details found
	$product = $row['product_id'];
	$prod_img = $row['product_image'];
	$prod_details = $row['product_details'];
	// $attribute = $row['attribute'];
	// $value = $row['value'];
?>

		<section class="elementor-section elementor-top-section elementor-element elementor-element-3b90f5a0 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="3b90f5a0" data-element_type="section" data-settings="{&quot;_ha_eqh_enable&quot;:false}">
						<div class="elementor-container elementor-column-gap-default">
				
						<div class="elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-5f46e61f" data-id="5f46e61f" data-element_type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
								<div class="elementor-element elementor-element-44706ef elementor-widget elementor-widget-image" data-id="44706ef" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
									<img decoding="async" width="500" height="500" src="admin/upload/<?php echo $prod_img;?>" class="attachment-full size-full wp-image-410" alt="" srcset="admin/upload/<?php echo $prod_img;?> 1080w, admin/upload/<?php echo $prod_img;?> 300w, admin/upload/<?php echo $prod_img;?> 1024w, admin/upload/<?php echo $prod_img;?> 150w, admin/upload/<?php echo $prod_img;?> 768w" sizes="(max-width: 1080px) 100vw, 1080px">	</div>
				</div>
					</div>
		</div>
						<div class="elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-627d535e" data-id="627d535e" data-element_type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
								<div class="elementor-element elementor-element-91936e0 elementor-widget elementor-widget-text-editor" data-id="91936e0" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
			<style>
.elementor-widget-text-editor.elementor-drop-cap-view-stacked .elementor-drop-cap{background-color:#69727d;color:#fff}.elementor-widget-text-editor.elementor-drop-cap-view-framed .elementor-drop-cap{color:#69727d;border:3px solid;background-color:transparent}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap{margin-top:8px}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap-letter{width:1em;height:1em}.elementor-widget-text-editor .elementor-drop-cap{float:left;text-align:center;line-height:1;font-size:50px}.elementor-widget-text-editor .elementor-drop-cap-letter{display:inline-block}</style> 

				</div>
				<div class="elementor-element elementor-element-988cdbd elementor-widget elementor-widget-text-editor" data-id="988cdbd" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
					<?php echo $prod_details ?>	</div>
				</div>
				</div>
		</div>
				
						</div>
		</section>

		<?php
} else {
    // Product not found, display message
    echo "<h1>Product-Details not found.</h1>";
}
?>

  <?php
include("footer.php")
?>