On Saturday 11 December 2004 20:46, Stuart Felenstein wrote:
> --- [EMAIL PROTECTED] 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:
Inside the while loop.
Tip: (para-phrasing the above comments) in a WYSIWYG HTML editor create a form
with a multiple select list box, make one or two of the items selected by
default, examine the HTML source.
> <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.
Yes, you need to reference $_GET to see whether an option was selected and
change the echo above accordingly.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
<rcw> those apparently-bacteria-like multicolor worms coming out of
microsoft's backorifice
<rcw> that's the backoffice logo
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php