[thelist] returning values form dropdown
Matthias Ritzkowski
Matt at grndwtr.com
Fri Jul 19 08:11:00 CDT 2002
Hi all evolters -
I am in need for a little clearing of the brain on this one ...
This is a PHP database front end. I have a form which assigns values with
two select boxes (All available and currently selected).
Select boxes are populated form the database.
So far so good.
Now, if I want to use the naming convention with square brackets to return
all chosen values for the "currently selected", my JavaScript on this
particular page blows up. I have stolen Matt Kruse's template for moving
items between select boxes.
The only solution I have seen, which looks really clumsy, is to select all
values before I hit the submit button.
Is there any other way? I could swear I have seen something where the name
of the select box had escaped characters, but I cannot figure out how
Thanks a lot!
Regards
Matthias Ritzkowski
<tip "Using subselects in mySQL">
1. build querystring #1 (to be used for subselect) as in
"Select x, y from x-table where z not in(";
2. build querystring# 2
"Select x, y from x-table where --whatever the condition is ---
3. when you return values for #2, start appending the string for query #1
so result will look like
value 1
value 2
value 3
and querystring #1 will look like
"Select x, y from x-table where z not in('value 1', 'value 2', 'value 3'),
etc.
</tip>
Regards
Matthias Ritzkowski
More information about the thelist
mailing list