Re: Question: Repopulating form parameters
| From: | Stuart Felenstein | Date: | Sat, 11 Dec 2004 12:46:41 +0000 |
| Subject: | Re: Question: Repopulating form parameters | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-204048@lists.php.net to get a copy of this message | ||
--- php-list-replies@listmail.innovate.net wrote:
> you (just) need to mark the previously chosen items
> as "selected" in
> the repopulated list. the "highlighting" part is a
> basic html/form
> issue. i.e., if you have questions on this you
> should look at how, on
> a simple (html-only) form, an item on a list is
> marked (highlighted)
> as the default. obviously you have set up your code
> so that you know
> what's been selected previously and then put out the
> necessary html
> when you repopulate.
>
This makes sense, however I'm still spacing out trying
to figure out then where I place the "option value
selected" in this html / php code:
<select name="Ind[]" size="8" multiple="multiple"
id="Ind[]" >
<?php while($row = mysql_fetch_array($inds,
MYSQL_BOTH)) { echo '<option
value="'.$row['CareerIDs'].'">'.$row['CareerCategories'].'</option>
'; ?>
I'm pretty sure I need to loop through the $_Get of
the array. Not sure , and haven't found anything
that shows this.
Stuart