Re: Dropdown Menu Woes
| From: | Cynic | Date: | Thu, 07 Dec 2000 12:11:58 +0000 |
| Subject: | Re: Dropdown Menu Woes | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-29110@lists.php.net to get a copy of this message | ||
Is the server configured to parse .html files? I guess it
isn't, because when you look in the source of the file
displayed in browser, it's full of PHP. That's why you
don't get what you expect.
At 13:01 7.12. 2000, Roy W wrote the following:
--------------------------------------------------------------
>I'm afraid that doesn't work either.
>
>:-(
>
>http://www.divadallas.org/php/colorform1.html
>
>Thanks though
>
>
>Roy
>
>
>Miles Thompson <milesthompson@sprint.ca> wrote in message
>news:3A2F7C36.81D02377@sprint.ca...
>> Try echo
>> htmlentities("<option>\"$color\"</option>");
>>
>> Miles
>>
>> Roy W wrote:
>>
>> > Having trouble creating a drop-down menu using the following code:
>> >
>> > ....more code
>> > <FORM method="POST" action="formresult.php3">
>> > Pick a color:<select size="1" name="colorselect">
>> > <?
>> > ...more php code
>> > WHILE ($i < $number):
>> > $color = mysql_result($result,$i,"color");
>> > echo htmlentities("<option>$color</option>");
>> > /* also tried but no-go: PRINT "<option>$color</option>";
>> > */
>> > $i++;
>> > ENDWHILE;
>> > ?>
>> > ....more code
>> >
>> > The above puts the string: "$color" into the dropdown menu
>> >
>> > Thanks so much for any help!!!
>> >
>> > Roy
>> >
>> > --
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>> > For additional commands, e-mail: php-general-help@lists.php.net
>> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>> For additional commands, e-mail: php-general-help@lists.php.net
>> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>For additional commands, e-mail: php-general-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
------end of quote------
____________________________________________________________
Cynic:
A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.
cynic@mail.cz
ICQ: 2808 2505