title: MySQL and PHP Select Option with information from database
body: <p>This is my project 
  so far I have this I took the code from part of my project
  <div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php  error_reporting(E_ERROR | E_PARSE); ?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Call Ins &lt;/title&gt;
  &lt;script type="text/javascript" src="Javascript/jquery.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="Javascript/jquery-1.11.1.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="Javascript/employee_number_autocomplete.js"&gt;&lt;/script&gt;
  
  
  &lt;link href="css/create.css" rel="stylesheet" type="text/css" &gt;
  &lt;/head&gt;
  &lt;body style="background-image: url('http://a0319p528/new_callins/images/background.jpg')"&gt;
  &lt;div align="center"&gt;
  &lt;/div&gt;
  &lt;h1 class="h1"&gt;Call Ins Entry Page&lt;br&gt;&lt;br&gt;&lt;/h1&gt;
  &lt;div align="center"&gt;
  &lt;form action = "insert_process.php" method ="post" class="form" style="width: 700px; height: 575px"&gt;
  &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
  
   &lt;table style="width: 81%"&gt;
  &lt;tr&gt; 
   &lt;!--start of Scheduled Date--!&gt;
   &lt;td style="width: 133px"&gt;Scheduled Date&lt;/td&gt;
   &lt;td style="width: 152px"&gt;
   &lt;input name="Date_Scheduled" id="Date_Scheduled" type="text"value="&lt;?php  echo date("M j, Y - g:i"); ?&gt;"/&gt;
  &lt;/td&gt;
   &lt;!--end of Scheduled Date--!&gt;
   &lt;!--start of reason--!&gt;
   &lt;td style="width: 159px"&gt;Reason&lt;/td&gt;
  &lt;td&gt;
   &lt;select name ="Reason" style="width: 160px" &gt;
   &lt;option value =""&gt;Please select ...&lt;/option&gt;&lt;/select&gt;
  &lt;/td&gt;&lt;/tr&gt;
   &lt;!--end of reason--!&gt;
   &lt;!--start of Employee Name--!&gt;   
  &lt;tr&gt;
   &lt;td style="width: 133px"&gt;Employee Name&lt;/td&gt;
   &lt;td style="width: 152px"&gt;
   &lt;input type="text" id="Employee_Name" name="Employee_Name"&gt;
  &lt;/td&gt;
   &lt;!--end of Employee Name--!&gt;
   &lt;!--start of Contact--!&gt;
   &lt;td style="width: 159px"&gt;Contact&lt;/td&gt;&lt;td&gt;
   &lt;select name ="Contact" style="width: 160px"&gt;
   &lt;option value =""&gt;Please select ...&lt;/option&gt;&lt;/select&gt;
  &lt;/td&gt;&lt;/tr&gt;
   &lt;!--end of Contact--!&gt;
   &lt;!--start of Employee Number--!&gt;
  &lt;tr&gt;
        &lt;td style="width: 133px"&gt;Employee Number&lt;/td&gt;
   &lt;td style="width: 152px"&gt;
   &lt;input type="text" id="Employee_Number" name="Employee_Number" &gt;&lt;/td&gt;
   &lt;!--end of Employee Number--!&gt;
   &lt;!--start of Approval--!&gt; 
   &lt;td style="width: 159px"&gt;Approval&lt;/td&gt;
  &lt;td&gt;
   &lt;select name ="Approval" style="width: 160px"&gt;
   &lt;option value =""&gt;Please select ...&lt;/option&gt;&lt;/select&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
   &lt;!--end of Approval--!&gt;
  &lt;tr&gt;
   &lt;td style="width: 133px"&gt;Time_Reported&lt;/td&gt;
   &lt;td style="width: 152px"&gt;&lt;input name="Time_Reported" id="Time_Reported" type="text"value="&lt;?php  echo date("M j, Y - g:i"); ?&gt;"/&gt;&lt;/td&gt;
  &lt;/td&gt;
   &lt;!--end of Approval--!&gt;
   &lt;!--start of Scheduled Area--!&gt;
   &lt;td style="width: 159px"&gt;Scheduled Area&lt;/td&gt;
   &lt;td&gt;&lt;select name ="Scheduled_Area" style="width: 160px" &gt;
   &lt;option value =""&gt;Please select ...&lt;/option&gt;&lt;/select&gt;&lt;/td&gt;
  &lt;/tr&gt;
   &lt;!--end of Scheduled Area --!&gt;
   &lt;/table&gt;
  &lt;br&gt;
   &lt;input type="submit" value= "Submit Request "&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
   &lt;!--start of yes or no Checkbox--!&gt;
   &lt;p class="style1"&gt;Do not check Box bellow human resources use only&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;
   &lt;label&gt;no&lt;/label&gt;
   &lt;input type="checkbox" id="Complete" name="Complete" value="N"&gt;
   &lt;label&gt;yes&lt;/label&gt;
   &lt;input type="checkbox" id="Complete" name="Complete" value="Y"&gt; &lt;br&gt;
   &lt;!--end of no or yes checkbox--!&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
   header('Content-Type: application/json');
      $db_conx = mysqli_connect("localhost", "root", "systems399", "employees_db");
      $Employee_Name=  $_POST["Employee_Name"];
       $sql="SELECT * FROM  names WHERE FIRSTNAME='$Employee_Name'   ";
      $query= mysqli_query($db_conx, $sql);
      $row = mysqli_fetch_array($query, MYSQLI_ASSOC);
      $rc= $row["EMPLOYEE_NUMBER"];
      echo json_encode ($rc);
   ?&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Is there a way to make a select option with mysql db and php </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;select name ="Employee Name" style="width: 160px" &gt;
  &lt;option value =""&gt;Please select ...&lt;/option&gt;&lt;/select&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>But have the option value get the names from the two columns in the database Firstname and lastname. I will continue to Google it if anyone came across any examples or tutorials please share. </p>
  
  <p>Thank you </p>