Jump to content

Add to MySQL dropdown list on the fly


MargateSteve

Recommended Posts

I have searched for a solution to this but as I am not quite sure what I am searching for (as the title may prove) I have had no joy. The term I have used is the way it is described in PHPMaker.

 

What I am looking to do, is allow a user to select an option, via a drop down menu populated from a MySQL table, but if the option is not there, they can then add the option without having to refresh the page.

 

As a rough example, if I had a dropdown that allowed users to select their country, the database table may have

id country

1England

2Scotland

3Wales

 

If a user was from Ireland, I would like them to click on an 'Add Country' button, fill in a form on the same page, and on submitting, the option would be added to the table and appear in the dropdown.

 

 

If anyone can explain what term I need to search for, I would be grateful.

Thanks in advance

Steve

Link to comment
https://forums.phpfreaks.com/topic/244520-add-to-mysql-dropdown-list-on-the-fly/
Share on other sites

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.