I have a MySql db, in which I search for values to populate a selection
box, as follows :
<select size="1" name="customer" >
<option selected="selec ted">(not queried)</option>
<?php while($nt=mysql _fetch_array($r esult2)){
echo "<option value=$nt[customer]>$nt[customer]</option>\n";}
?>
</select>
This works fine, all the customers appear with their complete names,
including spaces if there are.
When I do a submit of the php page containing this part of code and in
this page I do a
$customer=$_POS T['customer'];
then the value of $customer is cutted to the first <blank(space)
encountered.
E,g, : if in the selection box the customer name John Smith appears,
then I get in the result page after the submission as customer=John
When I make a selection box, with fixed populated values (so values not
fetched from the db) then after the submission, I get the correct info
(values are not cutted to the first space).
Is there anybody out there that can give a solution for this strange
(to me) behaviour ? It would be uttermost appreciated !
box, as follows :
<select size="1" name="customer" >
<option selected="selec ted">(not queried)</option>
<?php while($nt=mysql _fetch_array($r esult2)){
echo "<option value=$nt[customer]>$nt[customer]</option>\n";}
?>
</select>
This works fine, all the customers appear with their complete names,
including spaces if there are.
When I do a submit of the php page containing this part of code and in
this page I do a
$customer=$_POS T['customer'];
then the value of $customer is cutted to the first <blank(space)
encountered.
E,g, : if in the selection box the customer name John Smith appears,
then I get in the result page after the submission as customer=John
When I make a selection box, with fixed populated values (so values not
fetched from the db) then after the submission, I get the correct info
(values are not cutted to the first space).
Is there anybody out there that can give a solution for this strange
(to me) behaviour ? It would be uttermost appreciated !
Comment