title: AJAX success not displaying my PHP errors or success messages
body: <p>I have an AJAX call to submit a form and on success I want to display the PHP success message or Error message.</p>
  
  <p>Here is my AJAX success:</p>
  
  <pre><code>success: function (data) {
              resultSuccess = $(data).find("#success");
              resultError = $(data).find("#error");        
              $('#resultBlock').html(resultSuccess);
              $('#resultBlock').html(resultError);    
          }
  </code></pre>
  
  <p>If I remove one of them it works. For example if I write it like this:</p>
  
  <pre><code>success: function (data) {
              resultSuccess = $(data).find("#success");        
              $('#resultBlock').html(resultSuccess);  
          }
  </code></pre>
  
  <p>I works with no problem its only when I add the other one is when it stops working. How do I write it in a way to show one and/or both messages?</p>