I have a select box that looks up values from my database, and then runs a jquery function to display the results, function is working fine, but some of the values in the database have spaces i.e "BT Global" the results are returning everything that starts with "BT"
any help appreciated.
<?php
$sql = 'SELECT customer FROM device GROUP BY customer';
if(!$result = $db->query($sql)){
die('There was an error running the query [' . $db->error . ']');
}
echo "<select class='form-control' id='fwname' onchange='getfirewall();'>";
echo "<option selected='Choose Customer'>Choose Customer</option>";
while($row = $result->fetch_assoc()){
$thevalue = $row['customer'];
echo "<option value=".$thevalue.">";
echo $thevalue;
echo "</option>";
}
echo "</select>";
?>`