Re: setting initial vlaue of optionbox
| From: | Jasper Bryant-Greene | Date: | Sun, 03 Jul 2005 22:01:29 +0000 |
| Subject: | Re: setting initial vlaue of optionbox | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-218059@lists.php.net to get a copy of this message | ||
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