title: XML Parsing Error: no root element found
body: <p>I am trying to search for all properties in a database that are in one suburb. I have read that it has something to do with the HTML code 204 but I still do not undertand what to do or what it really means. I have not done any JS or PHP in a while so this may be a really silly error but I cannot for the life of me figure it out. Please Help!</p>
  
  <p>Here is my JS code:</p>
  
  <pre><code>function basicSearch(){
  
      //Connect Script to the PHP
      var urlLink = "basicSearch.php";
      //Get search parameters:
      var searchAreaBar = document.getElementById("searchAreaBar").value;
  
      //define the parameters to send to php
      var strParameters = "searchAreaBar="+searchAreaBar + "&amp;sid=" + Math.random();
  
          // define the options for the AJAX request
          var objOptions = {
          // use method post
          method: "post",
          // use strParameters as the parameters
          parameters: strParameters,
          // if successfil call fuction(objXHR)
          onSuccess: function(objXHR) {
  
              // if objXHR. responseText = yes
              if(objXHR.responseText=='Yes'){
  
                  alert("Success!");
  
              }
              else{
  
                  alert("Error! No Properties Found!");
  
              }
          }
      }
  
      // define the AJAX request object
      var objRequest = new Ajax.Request(urlLink,objOptions);
  
  }
  </code></pre>
  
  <p>Here is my PHP code:</p>
  
  <pre><code>&lt;?php
  
      //Link the username and password:
      $connect = mysqli_connect("localhost", "admin", "12345", "realestate") or die ('Connection to database failed: ' . mysql_error());
      //Extract variables for request parameters:
      extract($_REQUEST);
  
      //Define the query:
      $BasicSearch = "SELECT * FROM properties WHERE Suberb='$searchAreaBar'";
      //Run the query:
      $resDasicSearch = mysqli_query($BasicSearch) or die(mysql_error());
      //SET intCount to number of rows in result:
      $intCount = mysqli_num_rows($resDasicSearch);
  
      //If intCount is greater than 0:
      if($intCount &gt; 0){
          //Echo Yes:
          echo "Yes";
      }
      else{
  
          //Echo no:
          echo "No";
  
      }
  
  ?&gt;
  </code></pre>
  
  <p>Thanks in advance.</p>