Re: setting initial vlaue of optionbox

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ross wrote:
value="<?=$subject; ?>"

Keeps the value of $subject that was previously entered in the textarea even after the form is submitted with php_self(). Is this possible with the listbox??

<select name="selectBox">
<option value="someOption"<?php if($_GET['selectBox'] == 'someOption') { ?> selected<?php } ?>>Some Option</option>
</select>

Alter to suit your needs, of course.

Jasper

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux