Hi All,
Something strange has happened to my code and all of a sudden my select dropdown is only saving the first part of the value to the database. for instance a dropdown will list all suppliers with their full name displayed i.e ‘COMPANY NAME LTD’ but when I select one and save to the database the script is also adding/updating the database with the value up until it hits a space with the name.
I’ve tried to search on the internet to see if anyone else has experienced this but couldn’t locate any topics?
my code is as follows;-
[php]<?php
$supplier = “SELECT name FROM fms_tbl_suppliers WHERE client_id=’{$_SESSION[‘client_id_of_user’]}’ ORDER BY name ASC”;
$result = mysqli_query ($db, $supplier);
echo “”;
echo “SELECT…”;
while($r = mysqli_fetch_array($result)){
echo “” . $r[‘name’] . “”;
}
echo “”;
?> [/php]
can any one shed any light or point me in the right direction?