title: Retrieving SQL database value in dropdown with multiple select option and post the values
body: <p>I have retrieved the database values in dropdown list with multiple select option using PHP MySQL. My code is as follows.</p>
  
  <pre><code>$sql = "SELECT student_id, name, phone FROM student";
  $result = $conn-&gt;query($sql);
  
  if ($result-&gt;num_rows &gt; 0) {
  
      echo "&lt;select name='num' multiple &gt;";
      while($row = $result-&gt;fetch_assoc()) {
         echo "&lt;option value='" . "'&gt;" . $row['name']. " " . $row['phone_number'] ."&lt;/option&gt;";
      }
      echo "&lt;/select&gt;";
  
  
  
  
  } else {
      echo "0 results";
  }
  </code></pre>
  
  <p>What I need is, I want to post the multiple selected phone_number values to another page. Also, Is it possible to create a checkbox before the list values?</p>
  
  <p><img src="https://i.stack.imgur.com/DYBhf.jpg" alt="Now am getting the output as in this image."></p>