title: how get the option value $r['id_usr'] of select tag in PHP variable
body: <p>I need to get the option value of a select tag which is <code>$r['usr_id']</code> when submitted to use that value in <strong>php</strong> query</p>
  <p><strong>here is my code :</strong></p>
  <pre class="lang-php prettyprint-override"><code> &lt;pre&gt;
       &lt;div class=&quot;form-group&quot;&gt;
       &lt;label class=&quot;col-md-2 col-xs-12 control-label&quot;&gt;Piloté Par&lt;/label&gt;
       &lt;div class=&quot;col-md-4 col-xs-12&quot;&gt;  
          &lt;?php
          // LOGIN TO DATABASE SCRIPT WRITTEN FOR MYSQLI
          $mysqli = new mysqli(&quot;localhost&quot;, &quot;root&quot;, &quot;&quot;, &quot;schb&quot;);
          if ($mysqli-&gt;connect_errno) {
              echo &quot;Failed to connect to MySQL: (&quot; . $mysqli-&gt;connect_errno . &quot;) &quot; . $mysqli-&gt;connect_error;
          }
          // END OF LOGIN TO DB SCRIPT
  
          $query_ak = &quot;SELECT id_usr, nom_usr, pnom_usr FROM user WHERE role='Pilote processus' AND id_usr NOT IN (SELECT pilot_id FROM processus)&quot;;
          $result = $mysqli-&gt;query($query_ak);
          ?&gt;
          &lt;select class=&quot;form-control select&quot; name=&quot;slctpilot&quot; &gt;
              &lt;?php
              while ($r = mysqli_fetch_assoc($result)) {
                  echo '&lt;option value=&quot;' . $r['id_usr'] . '&quot;&gt;' . $r['nom_usr'] . ' ' . $r['pnom_usr'] . '&lt;/option&gt;';
              }
              ?&gt;
          &lt;/select&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/pre&gt;
  </code></pre>