Thanks for the responses.
I've tried both suggestions to no avail.
The html entities suggestion does the following:
<option value=" V102483"> V102483</option>
<option value=" verbal"> verbal</option>
It looks as though it's preserving the spaces in the source, however in the list box, it is still removing them.
BuzzLY, with you suggestion, I'm getting errors as follows:
Parse error: parse error, unexpected T_VARIABLE in /var/www/html/admin/index2.php on line 104
Line 104 is:
$sHTMLOutput .= "'>" . $hasil2['PurchaseOrder'] . "</option>";
And all of the code is as follows:
<select name="options" class="form"
onChange="this.form.purchaseorder.value=this.value;"
class="form" size="5">
<?php
$queryPurchaseOrder = <<<EOS
SELECT PurchaseOrder
FROM $tblOrders
ORDER BY PurchaseOrder ASC
EOS;
$result2 = mysql_query($queryPurchaseOrder) or die("Select Failed!");
$sHTMLOutput = "";
while($hasil2 = mysql_fetch_array($result2)) {
$sHTMLOutput .= "<option value='" . $hasil2['PurchaseOrder']
$sHTMLOutput .= "'>" . $hasil2['PurchaseOrder'] . "</option>";
}
print $sHTMLOutput;
?>
</select>
I can't seem to determine the problem.
B