title: Want to give values in sql command dynamically by the dropdown box?
body: <p>I have a Attendance table containing attendance of all the employee.
  Currently i am working on report_generation page.
  So, i want to pass emp_mail id through drop-down box to fetch records of that particular employee.
  <a href="http://postimg.org/image/jerbl0e6j/" rel="nofollow">here is the database table containing records</a></p>
  
  <p>Here is the code from the report generation page:</p>
  
  <pre><code>$dbh = getDBH(); 
  $output = "";
  $sql = "SELECT ATT.AttDate FROM attandance ATT"; 
  $query = $dbh-&gt;prepare($sql); 
  $query-&gt;execute(); 
  $results = $query-&gt;fetchAll(\PDO::FETCH_OBJ); 
  $arrDates = array(); 
  foreach($results as $intKey=&gt;$objAttDate)
  { 
       $arrDates[] = $objAttDate-&gt;AttDate; 
  }
  var_dump($arrDates);
  </code></pre>