title: $variable not working in SELECT
body: <p>Why would the following SELECT statement be returning the else statement? and a blank echo of $latitude and $longitude</p>
  
  <pre><code>$latitude = $_GET["lat"];
  $longitude = $_GET["long"];
  $pScan="";
  $sql = "SELECT id, agent_name, address, url, latitude, longitude FROM enabled_boards WHERE latitude='$latitude' AND longitude='$longitude' ";
  $result = mysqli_query($conn, $sql);
  if (mysqli_num_rows($result) &gt; 0) {
      while($row = mysqli_fetch_assoc($result)) {
          $id=$row["id"];
          $agent=$row["agent_name"];
          $address=$row["address"];
          $url=$row["url"];
          $latitude=$row["latitude"];
          $longitude=$row["longitude"];
          $pScan.='  &lt;div id="wrapper"&gt;
          &lt;a href="propertyDisp.php?id=' . $id . '" target="_self" &gt;
    &lt;div id="agentIdent"&gt;&lt;img src="http://arpad.property/logos/' . $agent . '.jpg"&gt;&lt;/div&gt;
    &lt;div id="propertyIdent"&gt;&lt;h3 align="right"&gt;' . $address . '&lt;/h3&gt;&lt;/div&gt;
      &lt;/div&gt;&lt;/a&gt;'; 
  
      }
  }else{
  $pScan="No results found,&lt;br&gt;please ensure the property is Arpad Enabled.";
  }
  </code></pre>
  
  <p>Whereas replacing the SELECT statement values of $latitude and $longitude with the actual values from the form (lat &amp; long) it successfully echo's both $latitude and $longitude correctly, proving that the values in the form (lat &amp; long) are parsing correctly via the 2 variables.</p>
  
  <p>Using $latitude &amp; $longitude in the SELECT statement breaks it and I can't see why.</p>
  
  <p>Thanks for your help.
  Ian.</p>
  
  <p>FORM DETAILS</p>
  
  <pre><code> &lt;form action="scanBoard.php" method="post" name="scanBoard" &gt;
        &lt;input type="text" id="lat" value="52.562292" /&gt;&lt;br&gt;
         &lt;input type="text" id="long" value="-0.660871" /&gt;&lt;br&gt;
       &lt;div id="boardBtn" class="blink"&gt;&lt;input class="button" type="image" src="img/boardBtn.png" &gt;&lt;/div&gt;&lt;/form&gt;
  </code></pre>
  
  <p>*The values have been added to the inputs for testing and will be removed once I fix this issue.</p>
  
  <p>USING $latitude AND $longitude in SELECT statement.</p>
  
  <p><img src="https://i.stack.imgur.com/2RNBa.png" alt="incorrect"></p>
  
  <p>USING 52.562292 AND -0.660871 in SELECT statement.</p>
  
  <p><img src="https://i.stack.imgur.com/dV4F1.png" alt="enter image description here"></p>