Ok. I know how to do this, but I need to do it in a way that will pull the names from a database to populate the list boxes, then based on the selection it will take the ’id’ of the selected name and pull the image value form the database.
I thing I have a handle on creating the list boxes, but I have no idea how to call the second select statement passing it the ’id’ value.
tblnames
id value
1 Greg
2 Norman
3 Jane
4 Lori
5 Susan
Based on the selected name above, I can select the appropriate image recode from the table below, I just need to know how to do this?

tblimages
id filelocation name_fk
1 /images/... 5
2 /images/... 2
3 /images/... 1
4 /images/... 3
5 /images/... 4
The important thing is not to stop questioning. Curiosity has its own reason for existing. One cannot help but be in awe when he contemplates the mysteries of eternity, of life, of the marvelous structure of reality. It is enough if one tries merely to comprehend a little of this mystery every day. Never lose a holy curiosity.
-Albert Einstein (1879 - 1955)
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
-
☆ A M B ☆
- 24,524 Posts
Do both at the same time. Have the value of the option be the image ID, and the text be the individual’s name. Then when one is selected, you already know which image to display or whatever.
When processing the submission of the form, get the image data from the database using the POST value from the select. Or simplify things by having the images in one place, and you only need to know the filename; that can be the value, so you know to get /images/$_POST[’image’].jpg; this way you avoid another query to the database.
OK... I’m not sure I know how to create the ddlbox... I’ve tried to create one with the following code;
llbstart
<select name="menu" >
<option>Please Select</option>
to start the listbox...
then I have some dynamic data
goldenmale
<option>[+callname+]</option>
then I have to close out the listbox
lbfinish
so on my page I have
[[llbstart]]
[[goldenmale]]
[[lbfinish]]
I know this will not be the finished product, I just want to get a listbox with data init first.
How do you create a list box?
The important thing is not to stop questioning. Curiosity has its own reason for existing. One cannot help but be in awe when he contemplates the mysteries of eternity, of life, of the marvelous structure of reality. It is enough if one tries merely to comprehend a little of this mystery every day. Never lose a holy curiosity.
-Albert Einstein (1879 - 1955)
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Thank you so much Gary... It is so nice when you pose a question to the group and you receive a reply with a working solution.... Thank you again.
It will come in handy
The important thing is not to stop questioning. Curiosity has its own reason for existing. One cannot help but be in awe when he contemplates the mysteries of eternity, of life, of the marvelous structure of reality. It is enough if one tries merely to comprehend a little of this mystery every day. Never lose a holy curiosity.
-Albert Einstein (1879 - 1955)
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635