当通过select标签选择人数时获取输入值和数值

Please forgive me if i explain wrong. My website has different kinds of ticket name each ticket name has different price. I would like to do when I select the number through <select> tag it get the number value multiply by ticket price value. my code

<?php
session_start();
if (isset($_GET['id'])) {
    $id=$_GET['id'];
}
include("database/connection.php");
$sql1="SELECT title,GROUP_CONCAT(ticketname),GROUP_CONCAT(price) FROM `evprice` where title='$id'";
$q4=mysql_query($sql1);
$row1=mysql_fetch_array($q4);

?>
<form action="test.php" method="post">
 <div class="gaps">
   <div style="float: right; padding-right: 400px; ">
    <?php 
     $rowmain1=explode(',', $row1[2]);
     for ($i=0; $i<count($rowmain1); $i++) {
      echo "<label style='padding:5px;'>$rowmain1[$i]</label><br>";
    }
    ?>
  </div>
  <?php 
    $rowmain=explode(',', $row1[1]);
    foreach ($rowmain as $item) {
     echo"$item";
  ?>
 <select class="selectpicker selectcon" name="people" style="display: inline;" name ="count" value='$item'>
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<?php
 echo "<br>";
}?>
</div>

that means enter image description here If I did mistakes please correct my code

For complement the answer an example could be: 1.- Adding jquery to your site.

<script src="https://code.jquery.com/jquery-3.3.1.slim.js" integrity="sha256-fNXJFIlca05BIO2Y5zh1xrShK3ME+/lYZ0j+ChxX2DA="crossorigin="anonymous"></script>

2.- Need to prepare your document, the next code will get the value of the select it self.

<script type="text/javascript">
$(document).on('ready', function(){
$('select').on('change', function() {
  var selectValue = $(this).val();
  console.log(selectValue);
});
});
</script>

3.- You need to set on the iteration if the label an attribute like 'myattr="value"' with the value you want to mutiply. And get it and used it, need to add something like:

echo "<label style='padding:5px;' id='".>$rowmain1[$i]."' myattr="value">$rowmain1[$i]</label><br>";

<script type="text/javascript">
   $(document).on('ready', function(){
    $('select').on('change', function() {
      var selectValue = $(this).val();
      console.log(selectValue);
      var valueTicket = $("#my_id").attr("myattr");
      console.log(valueTicket);
      var mutiplyvalue = valueTicket * selectValue;
      console.log(mutiplyvalue);
    });
   });
    </script>

Need to change on your needs. Good luck.