Reply to Re: Drop Down Lists

Your name:

Reply:


Posted by Alan Little on 05/17/06 00:13

Carved in mystic runes upon the very living rock, the last words of Rik
of comp.lang.php make plain:

> Alec wrote:
>> How do I change the drop down list so the option selected last time is
>> then the current one shown in the drop down box?
>
>> <?php $townsearch = $_get['town']; ?>
>
> //euhm, $_GET['town'].....
>
>> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
>> <select size="1" name="town">
>
> <?php
> $towns = array('ipswich','bury', 'eanske');
> foreach($towns as $town){
> $selected = (isset($_GET['town'])&&$_GET['town']==$town)? '
> selected="selected"':'';

The SELECTED attribute is a boolean attribute, and does not require a
value (though it can have one)

http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.3.4.2

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/

[Back to original 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

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