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

Posted by Jerry Stuckle on 10/06/06 19:40

Pedro Graca wrote:
> rukkie wrote:
>
>> <?php while($nt=mysql_fetch_array($result2)){
>> echo "<option value=$nt[customer]>$nt[customer]</option>\n";}
>>?>
>
> [...]
>
>>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 !
>
>
>
> What's the difference between the PHP generated HTML and the one with
> fixed populated values?
>
> I'm guessing PHP does
>
> <option value=John Smith>John Smith</option>
>
> whereas the fixed value is
>
> <option value="John Smith">John Smith</option>
>
> Notice the quotes on the second line?
>

No, no difference at all, if it's coded correctly. If you view the
source in your browser, you should see:

<option value="John Smith">John Smith</option>

in either case.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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