title: Get value form same table
body: <p>I have dropdown menu with 3 values.</p>
  <p><img src="https://i.stack.imgur.com/qN9qP.jpg" alt="enter image description here" /></p>
  <p>and here is my table (table name is Sms)</p>
  <p><img src="https://i.stack.imgur.com/XB2mU.jpg" alt="enter image description here" /></p>
  <p>What I want to do? Example : If I choose 2,49 and press submit, then I get <code>sonum</code> value.</p>
  <p>This is my form</p>
  <pre><code>&lt;div class=&quot;col_12&quot; style=&quot;margin-top:100px;&quot;&gt;
      &lt;div class=&quot;col_6&quot;&gt; 
                  &lt;label for=&quot;asukoht&quot;&gt;Vali Hind&lt;/label&gt;
                  &lt;form class=&quot;vertical&quot; method=&quot;GET&quot;&gt;
                      &lt;select name=&quot;hind&quot;&gt;
                      &lt;option value=&quot;1&quot;&gt;-- Vali --&lt;/option&gt;
                      &lt;?php
                          
                      // Tegin dropdown menüü, kust saab valida komponendi, mille alla see pilt läheb
                      $andmed = mysql_query(&quot;SELECT * FROM Sms&quot;);
                       
                       // Dropdown menüü
                      while($rida = mysql_fetch_array($andmed)){
                          echo '&lt;option value=&quot;'.$rida['id'] . '&quot;&gt;'.utf8_encode($rida['hind'] ). '&lt;/option&gt;';
                      }
                      ?&gt;
                      &lt;input type=&quot;submit&quot; name=&quot;add&quot; id=&quot;add&quot;&gt;
                  &lt;/form&gt;
  </code></pre>
  <p>I tried something like this</p>
  <pre><code>if(mysql_query(&quot;DESCRIBE `Sms`&quot;)) {
                      
                          $sql = &quot;SELECT sonum FROM `Sms`&quot;;
                      echo $sql;
  }
  </code></pre>
  <p>I think it should be pretty easy, but I'm looking for a solution and I didnt found it.</p>
  <p>Thank you for helping !</p>