<?php
session_start();
require_once 'db_connection.php';

?>

<div class="row">
	<div class="col-12">
<label>Select Product</label><br>
<select class="form-select" id="product" onchange="showPrices();">
	<option value="0">Select Product</option>
	<?php
	$sql = "SELECT *  FROM mobileproducts WHERE status=1 ORDER BY proname ASC";
	$result = $conn->query($sql);
	if ($result->num_rows > 0) {
		while($row = $result->fetch_assoc()) {
			$prid = $row["prid"];
			$proname = $row["proname"];
			$prcode = $row["prcode"];
			$qty = $row["qty"];
			$brandname = $row["brandname"];
			$category = $row["category"];
			$discount = $row["discount"];
			$wsprice = $row["wsprice"];
			$sellprice = $row["sellprice"];
			echo '<option value="'.$prid.'"
			data-price="'.$wsprice.'"
			data-qty="'.$qty.'"
			data-proname="'.$proname.'"
			data-prcode="'.$prcode.'"
			data-brandname="'.$brandname.'"
			data-category="'.$category.'"
			data-discount="'.$discount.'"
			data-sellprice="'.$sellprice.'">'.$proname.'</option>';
		}
	}
	?>
</select>
</div>
</div>
