Re: Question: Repopulating form parameters

From: Date: Mon, 13 Dec 2004 11:00:59 +0000
Subject: Re: Question: Repopulating form parameters
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-204150@lists.php.net to get a copy of this message
--- Jason Wong <php-general@gremlins.biz> wrote: > > Here is just another variation of my multiple > select > > list. > > <option value="<?php echo > > $rsinds->Fields('CareerIDs')?>"<?php if > > ($rsinds->Fields('CareerIDs')== 5) {echo > "SELECTED";} > > ?>><?php echo > > $rsinds->Fields('CareerCategories')?></option> > > > > Here I was just testing with a specific value. > > the line == 5 will set the value "SELECTED" > correctly. > > If I put in 5, 6, or '5,','6', etc, I get an > error. > > However, I don't believe that line works for > multiple > > values. What works is still a mystery to me. > > For heaven's sake, do you even know what the HTML > *should* look like? Did you > construct an example to look at? If you're unable to > construct your own > example just look at someone else's, go find a site > that has multi-select > listboxes with pre-selected values and examine the > HTML source. > heaven's sake ? bit over dramatic. The code above is my created html. I've created a number of them, both from a table and just listing out some options. To repeat they all work . Yet all seem to have little in common when the values are dynamic and from an array. Stuart

« previous php.general (#204150) next »