title: Trouble with $.post and mysql db
body: <p>Someone please help! It's probably a really simple mistake I'm making, but I'm new to PHP &amp; MySQL. I'm trying to retrieve info from the db based on a user's date choice. I'm using some examples I found on youtube to post the input to the php page with jquery and display the retrieved values from php on the html page. However, it seems to only return the else if statement below. Your help is greatly appreciated! </p>
  
  <p>Html Below: </p>
  
  <pre><code>&lt;div id="customDateRange"&gt;
      &lt;h2&gt;Welcome &lt;?php echo $companyName ?&gt;&lt;/h2&gt;
      &lt;h3 style="color:#ff0000"&gt;This is currently under development&lt;/h3&gt;
      &lt;h4&gt;Please specify the dates you would like to view below:&lt;/h4&gt;
      &lt;label for="dateStart"&gt;Start Date&lt;/label&gt;
      &lt;input class="datePick" id="dateStart" name="dateStart" type="text"/&gt;
      &lt;label for="dateEnd"&gt;End Date&lt;/label&gt;
      &lt;input class="datePick" ud="dateEnd" type="text"/&gt;
      &lt;input id="getDateRange" type="submit" value="Display Report" /&gt;
      &lt;div id="fromDatabase"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Javascript Below:</p>
  
  <pre><code>$('.datePick').datepicker({ minDate: new Date(2013, 3 - 1, 1), dateFormat: 'yy-mm-dd' });
  
  $('input#getDateRange').on('click', function(){
      var startDate = $('input#dateStart').val();
      if ($.trim(startDate) != '') {
          $.post('../../includes/dateRangeDB.php', function(data, status){
              $('div#fromDatabase').text(data);
          });
      }
  });
  </code></pre>
  
  <p>PHP Below:</p>
  
  <pre><code>&lt;?php 
  if (isset($_POST['dateStart']) === true &amp;&amp; empty($_post['dateStart']) === false) {
      $query = mysql_query("
          SELECT TotalCost FROM adwords_reporting WHERE CampaignID = 'CAMP020' AND Date IN ('" . mysql_real_escape_string(trim($_POST['dateStart'])) . "')
      ");
  
      echo "Total Cost: " . (mysql_num_rows($query) !== 0) ? mysql_result($query, 0, 'TotalCost') :  'Date Not Found';
  }
  else if (isset($_POST['dateStart']) === false) {
      echo "WTF MAN!";
  }
  else {
      echo "It seems there is an issue";
  }
  ?&gt;
  </code></pre>
  
  <p>Thank you for your help! </p>