Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.