You are here: post of fetched value fails « PHP Programming Language « IT news, forums, messages
post of fetched value fails

Posted by rukkie on 10/06/06 07:12

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="selected">(not queried)</option>
<?php while($nt=mysql_fetch_array($result2)){
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=$_POST['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 !

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация