title: get selected value of a drop down which is populated with results from an SQL query
body: <p>So I have a drop down populated with the names based on an SQL query. I want to be able to see  which option the user selected before they pressed submit and use this as a variable on a separate php file. I assume I will need to use session variables? I'm a bit lost so any help would be appreciated. I have the following code so far: </p>
  
  <pre><code>&lt;form name="ClientNameForm" id="ClientNameForm" action="ClientDetails.php"&gt;
        &lt;input type="text" name="ClientName" id="ClientName" placeholder="Type Service User's name here:" style="width: 200px"/&gt;&lt;br/&gt;&lt;br/&gt;
        &lt;select name="Name_dropdown" id="name_dropdown" style="width: 200px" &gt;
  
        &lt;?php
        $ClientName_Query= "SELECT CONCAT(FName, ' ', SName) AS FullName FROM ClientDetails";
  
        $ClientName_Result= mysql_query($ClientName_Query) or die (mysql_error());                
        while ($row= mysql_fetch_array($ClientName_Result)){
  
          echo "&lt;option&gt; $row[FullName] &lt;/option&gt;";
  
        }
        ?&gt;
  &lt;/select&gt;&lt;br/&gt;&lt;br/&gt;
  &lt;input type="submit" name="submit_btn" id="submit_btn" value="Submit"/&gt;
  &lt;/form&gt;
  </code></pre>