title: Dynamic SQL request in a PHP code
body: <p>I'm currently coding a plugin in PHP and I have a list box containing numbers from 1 to 30 and a "submit" button. The plugin page is running some SQL request.</p>
  
  <p>The point is the SQL request should update when you choose a number in the <code>list box</code> and click the submit button. </p>
  
  <p>For instance:</p>
  
  <pre><code>SELECT G.xxx 
  FROM yyy M, 
       zzz G 
  WHERE M.name = G.nomfield 
  AND G.nomfield = "xxx" 
  AND G.idfield = 01 
  AND G.xxx = $numberfrom1to30
  </code></pre>
  
  <p>the display should be different according to the number selected in the <code>list box</code> after the submit button is clicked. How should I do this?</p>
  
  <p>I tried to:</p>
  
  <pre><code>&lt;?php 
  $selected = isset( $_GET['numberfrom1to30'] ) ? $_GET['numberfrom1to30'] : "" ;
  $selectedValue = 'selected="selected"';
  ?&gt;
  </code></pre>
  
  
  
  <pre><code>&lt;?php           
  $numberfrom1to30= $_GET['numberfrom1to30'];
  ?&gt;
  </code></pre>
  
  <p>But here's my error: <code>Unknown column '$numberfrom1to30' in 'where clause'</code></p>