title: How to display records for specific date in php?
body: <p>I have to display records for specific date.Below Code i tried.I am getting output "0 Results";</p>
  
  <pre><code>   $startDate=$_POST['startDate'];//date in format(d-m-y)
         $endDate=$_POST['endDate'];//date in format(d-m-y)
  
       include("../db/connection.php") ;
  
       $sql ="SELECT *FROM Emp WHERE empDate BETWEEN $startDate AND $endDate";
  $result = $conn-&gt;query($sql);
  
   if ($result-&gt;num_rows &gt; 0) {
      // output data of each row
      while($row = $result-&gt;fetch_assoc()) {
          echo "id: " . $row["Id"]. " - Name: " . $row["First_name"]. " " . $row["Last_name"]. "&lt;br&gt;";
      }
  } else {
      echo "0 results";
  }
  $conn-&gt;close();
  }
  </code></pre>
  
  <p>I have records in my database like this</p>
  
  <pre><code>2016-10-03 2:51:35
  2016-10-03 2:53:25
  2016-10-04 3:52:30
  2016-10-04 4:15:55
  </code></pre>
  
  <p>I founded question on stackoverflow <a href="https://stackoverflow.com/questions/14086096/get-values-from-table-only-for-a-specific-day-in-mysql">get values from table only for a specific day in mysql</a> but that query is not working for me.Would you help me in this?</p>