Jump to content

Dynamic List Populating Text Field


derbystar16

Recommended Posts

I have a MySQL table with two columns: Name and Email

 

What I need to do is in my PHP page, insert a dynamic list box populated with all of the names in the table. I have that working.

 

Next, when I click on any of the names in that list box, I want the corresponding email address to show up in a seperate text field. This is something that shouldn't be difficult but I've been beating my head against the wall trying to figure it out. When a name is selected, the text field displays that person's corresponding email.

 

Can anyone help me out? I'm using dreamweaver mx 2004 and a PHP page.

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/38671-dynamic-list-populating-text-field/
Share on other sites

You will not be able to do this with php. PHP is server side so you would have to select the name first, submit it, then php will output the e-mail address. The only way to do what you want would be to use ajax or javascript to have the e-mail address show when you click on a name.

 

Ray

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.