<div class="row mt-2">
	<div class="col-md-12">
		<select class="form-select" id="city" onchange="viewDeliveryCost(this.value);">
			<option value="0">Select City</option>
			<?php
			require_once 'db_connection.php'; 
			$country = $_POST['country'];
			$sql = "SELECT * FROM mobilecity WHERE country=$country";
			$result = $conn->query($sql);

			if ($result->num_rows > 0) {
  // output data of each row
				while($row = $result->fetch_assoc()) {
					$cyid = $row["cyid"];
					$cityname = $row["cityname"];
					$crate = $row["crate"];
					echo '<option value="'.$cyid.'" data-rate="'.$crate.'">'.$cityname.'</option>';
				}
			}
			?>
		</select>
	</div>
</div>